POV-Ray : Newsgroups : povray.general : Bounding takes time... Server Time
4 Nov 2024 21:23:38 EST (-0500)
  Bounding takes time... (Message 1 to 3 of 3)  
From: Spider
Subject: Bounding takes time...
Date: 23 Jan 1999 13:25:59
Message: <36AA1331.F122EC85@bahnhof.se>
Hello... Just a little question here...

I'm trying to place a lot of spheres in a postition, the Y pos is linear, adn the X/Z
is
smothly changed.. 
But, this little pice of code gives me a pain... 
The bounding time is horrible.... (I'm not patient there.)

I'm using winpov, 3.1a .

Any ideas ???

//Spider

#declare drop = sphere { <0,0,0> 0.1 }
union {
  #local Drops = 1000;
  #local DropsInv = 1/Drops;
  #local EndX = 15;
  #local EndY = 20;
  #local Yc = DropsInv*EndY;
  #local Xc = DropsInv*EndX;
  #local s1 = seed(666); 
  #local s2 = seed(777);  
  #local N = Drops;
  #while(N>0)
    #local TransY = N*Yc; 
    object { 
      drop 
      translate <exp(N)*Xc, TransY, 0>
      rotate <0,rand(s2)*360,0>
    }
    #declare N=N-1;
  #end
  pigment { rgb 1 }
  translate -EndY*0.5*y
}


Post a reply to this message

From: Graham Redway
Subject: Re: Bounding takes time...
Date: 23 Jan 1999 18:41:41
Message: <36AA5D8B.490F8B3F@compuserve.com>
Spider,
    It's to do with the 'exp(N)' in the translation:
>>translate <exp(N)*Xc, TransY, 0><<

I substitued a '1' and it bounds ->much<- quicker.
e to the power of 1000, then e to the power 999, e to 998 ... are v. large numbers.
Why
would you want to translate something in the direction of x with a huge (near
inifinate)
value when y is only translated to a maximum of 15?

Hope this helps.
    Graham.


Spider wrote:

> Hello... Just a little question here...
>
> I'm trying to place a lot of spheres in a postition, the Y pos is linear, adn the
X/Z is
> smothly changed..
> But, this little pice of code gives me a pain...
> The bounding time is horrible.... (I'm not patient there.)
>
> I'm using winpov, 3.1a .
>
> Any ideas ???
>
> //Spider
>
> #declare drop = sphere { <0,0,0> 0.1 }
> union {
>   #local Drops = 1000;
>   #local DropsInv = 1/Drops;
>   #local EndX = 15;
>   #local EndY = 20;
>   #local Yc = DropsInv*EndY;
>   #local Xc = DropsInv*EndX;
>   #local s1 = seed(666);
>   #local s2 = seed(777);
>   #local N = Drops;
>   #while(N>0)
>     #local TransY = N*Yc;
>     object {
>       drop
>       translate <exp(N)*Xc, TransY, 0>
>       rotate <0,rand(s2)*360,0>
>     }
>     #declare N=N-1;
>   #end
>   pigment { rgb 1 }
>   translate -EndY*0.5*y
> }


Post a reply to this message

From: Spider
Subject: Re: Bounding takes time...
Date: 23 Jan 1999 19:01:23
Message: <36AA61CB.B4858BBE@bahnhof.se>
*smile*
Yeah, I know its a foolish thing to do, the effect I had intended was :

loop between 0 and 1, step 1/10000, then multiply and so on..
I choose a log function, got smoother...

But the reason for the question is why it takes so long to bound them?? 
Is it the union ??? I think there ios a setting to break unions, can't remember it....
Is it this ?

oh... I'm getting nasty tired of stack faults... *sigh* max_trace_level can't be high
enough...

(50000 transparent objects, filtering and reflecting, all in view... this gives a lot
of
relection.... I want a high trace level. Are the stack settings better in dos version
than
windows ??? )


//Spider

Graham Redway wrote:
> 
> Spider,
>     It's to do with the 'exp(N)' in the translation:
> >>translate <exp(N)*Xc, TransY, 0><<
> 
> I substitued a '1' and it bounds ->much<- quicker.
> e to the power of 1000, then e to the power 999, e to 998 ... are v. large numbers.
Why
> would you want to translate something in the direction of x with a huge (near
inifinate)
> value when y is only translated to a maximum of 15?
> 
> Hope this helps.
>     Graham.
> 
> Spider wrote:
> 
> > Hello... Just a little question here...
> >
> > I'm trying to place a lot of spheres in a postition, the Y pos is linear, adn the
X/Z is
> > smothly changed..
> > But, this little pice of code gives me a pain...
> > The bounding time is horrible.... (I'm not patient there.)
> >
> > I'm using winpov, 3.1a .
> >
> > Any ideas ???
> >
> > //Spider
> >
> > #declare drop = sphere { <0,0,0> 0.1 }
> > union {
> >   #local Drops = 1000;
> >   #local DropsInv = 1/Drops;
> >   #local EndX = 15;
> >   #local EndY = 20;
> >   #local Yc = DropsInv*EndY;
> >   #local Xc = DropsInv*EndX;
> >   #local s1 = seed(666);
> >   #local s2 = seed(777);
> >   #local N = Drops;
> >   #while(N>0)
> >     #local TransY = N*Yc;
> >     object {
> >       drop
> >       translate <exp(N)*Xc, TransY, 0>
> >       rotate <0,rand(s2)*360,0>
> >     }
> >     #declare N=N-1;
> >   #end
> >   pigment { rgb 1 }
> >   translate -EndY*0.5*y
> > }


Post a reply to this message

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