POV-Ray : Newsgroups : povray.general : report and question Server Time
2 Nov 2024 15:22:52 EDT (-0400)
  report and question (Message 1 to 9 of 9)  
From: Paul Bourke
Subject: report and question
Date: 21 Jan 2004 03:55:12
Message: <pdb_NOSPAM-6A5159.19551121012004@news.povray.org>
You may be interested in this, written for a local computer graphics
and mathematics group 
   http://astronomy.swin.edu.au/~pbourke/povray/representation/
I would also like any useful comments why figure 2 is so slow to
compute. I know there are some obvious small things like the 2pi
and perhaps changing the range but even so the compute time seemed
excessive.
-- 
Paul Bourke
pdb_NOSPAMswin.edu.au


Post a reply to this message

From: Paul Bourke
Subject: Re: report and question
Date: 21 Jan 2004 03:56:53
Message: <pdb_NOSPAM-7370E5.19565221012004@news.povray.org>
> You may be interested in this, written for a local computer graphics
> and mathematics group 
>    http://astronomy.swin.edu.au/~pbourke/povray/representation/
> I would also like any useful comments why figure 2 is so slow to
> compute. I know there are some obvious small things like the 2pi
> and perhaps changing the range but even so the compute time seemed
> excessive.

ps: Artifacts occur with an accuracy of 0.01

-- 
Paul Bourke
pdb_NOSPAMswin.edu.au


Post a reply to this message

From: Warp
Subject: Re: report and question
Date: 21 Jan 2004 04:11:07
Message: <400e422b@news.povray.org>
I don't know the answer to your question per se (except that the
parametric object has always seemed extremely slow to me...),
but on a side note, I think the section 5, which contains the
iterative sierpinski tetrahedron, could perhaps create the
iterations in a loop.
  Like it is now it gives the impression that if you want to do
something like that you'll need to copy-paste that #declare as
many times as there are iterations, editing each one of them.
The POV-Ray SDL is more powerful than this.
  You can make an array (as large as the number of iterations),
each item containing one iteration, and you can fill this array
in a loop, each item using the previous one. Thus if you want
to change the number of iterations it's enough to simply change
one number (eg. a "#declare Iterations=6;" at the beginning).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: ABX
Subject: Re: report and question
Date: 21 Jan 2004 04:12:17
Message: <jegs00d5qt8o38682j9vajr5hpg7oln9l9@4ax.com>
On Wed, 21 Jan 2004 19:55:12 +1100, Paul Bourke <pdb### [at] swineduau>
wrote:
> I would also like any useful comments why figure 2 is so slow to
> compute.

Did you tried 'precompute'?

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: report and question
Date: 21 Jan 2004 04:22:03
Message: <qps1e1-7a8.ln1@triton.imagico.de>
Paul Bourke wrote:
> You may be interested in this, written for a local computer graphics
> and mathematics group 
>    http://astronomy.swin.edu.au/~pbourke/povray/representation/

Good summary of the advantages of using POV-Ray for visualization tasks.

> I would also like any useful comments why figure 2 is so slow to
> compute. I know there are some obvious small things like the 2pi
> and perhaps changing the range but even so the compute time seemed
> excessive.

the parametric object is quite inefficient, in most cases it will be 
much faster to use ingo's param.inc:

http://members.home.nl/seedseven/#param

see also:

http://www.econym.demon.co.uk/isotut/param.htm


Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 11 Jan. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Severi Salminen
Subject: Re: report and question
Date: 21 Jan 2004 04:45:08
Message: <400e4a24@news.povray.org>
>   Like it is now it gives the impression that if you want to do
> something like that you'll need to copy-paste that #declare as
> many times as there are iterations, editing each one of them.
> The POV-Ray SDL is more powerful than this.
>   You can make an array (as large as the number of iterations),
> each item containing one iteration, and you can fill this array
> in a loop, each item using the previous one. Thus if you want
> to change the number of iterations it's enough to simply change
> one number (eg. a "#declare Iterations=6;" at the beginning).
> 

And I think Pov-Ray is even more powerful as even arrays are not needed 
in this. The easiest way to do it is probably (I changed a few translates):

#declare Initial = union {
    triangle { < 1,  1,  1>,  <-1,  1, -1>,  < 1, -1, -1> }
    triangle { <-1,  1, -1>,  <-1, -1,  1>,  < 1, -1, -1> }
    triangle { < 1,  1,  1>,  < 1, -1, -1>,  <-1, -1,  1> }
    triangle { < 1,  1,  1>,  <-1, -1,  1>,  <-1,  1, -1> }
}

#declare iter=5;
#declare Old=Initial;

#while(iter)
     #declare New =
     	union{
         	object { Old }
         	object { Old translate <-2, 0, 2> }
         	object { Old translate <-2, 2, 0> }
         	object { Old translate < 0, 2, 2> }
         	translate <1,-1,-1>
         	scale 0.5
     	}
     #declare Old=New;
     #declare iter=iter-1;
#end

object{New
     pigment {rgb 1}
}

Severi S.


Post a reply to this message

From: Severi Salminen
Subject: Re: report and question
Date: 21 Jan 2004 05:21:54
Message: <400e52c2$1@news.povray.org>
This is, of course, better :

> #while(iter)
>     #declare Old =
>         union{
>             object { Old }
>             object { Old translate <-2, 0, 2> }
>             object { Old translate <-2, 2, 0> }
>             object { Old translate < 0, 2, 2> }
>             translate <1,-1,-1>
>             scale 0.5
>         }
>     #declare iter=iter-1;
> #end

There is no need for "New at" all. "Old" is a bad choice for name now...

Severi


Post a reply to this message

From: Paul Bourke
Subject: Re: report and question
Date: 22 Jan 2004 02:35:34
Message: <pdb_NOSPAM-7E270A.18353322012004@news.povray.org>
> This is, of course, better :
> > #while(iter)
> >     #declare Old =
> >         union{
> >             object { Old }
> >             object { Old translate <-2, 0, 2> }
> >             object { Old translate <-2, 2, 0> }
> >             object { Old translate < 0, 2, 2> }
> >             translate <1,-1,-1>
> >             scale 0.5
> >         }
> >     #declare iter=iter-1;
> > #end
> There is no need for "New at" all. "Old" is a bad choice for name now...

That is significantly nicer, thanks, I've updated my example.

-- 
Paul Bourke
pdb_NOSPAMswin.edu.au


Post a reply to this message

From: Paul Bourke
Subject: Re: report and question
Date: 22 Jan 2004 02:39:22
Message: <pdb_NOSPAM-276BCC.18392222012004@news.povray.org>
On Wed, 21 Jan 2004 19:55:12 +1100, Paul Bourke <pdb### [at] swineduau>
> wrote:
> > I would also like any useful comments why figure 2 is so slow to
> > compute.
> Did you tried 'precompute'?

Just now yes, without much difference. It thought that was more for
multiple instances.

I prcomputed the pi variables pi/2 and 2pi, narrowed the sphere,
it really is rather sad still. 

-- 
Paul Bourke
pdb_NOSPAMswin.edu.au


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.