|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |