|
|
Hi,
Just something that i made yesterday, which i found quite nice.
It's a bunch of ellipsoids on the xz-plane which are placed in
a simple loop. I hope you like it, and perhaps somebody can
make a real Sunflower with it =)
Greetings,
Thies
Here's the iteresting part of the code:
[begin code]
#declare phi = 360*(sqrt(5)-1)/2; // turn-angle increase(divine proportion!)
#declare N=10000; // nr of seeds
#declare Angle = 0; // current angle
#declare dR = 0.05; // Radius-increase from seed to seed
#declare R=dR; // current radius
#while(N>0)
#local scaling = (4+15*max(0.0,ln(R)) ); // scaling of the seed
//(formula is just an
approximation..)
object {atom scale <scaling,3.5*scaling,scaling>
translate R*z rotate Angle*y texture{a_tex}}
#declare N=N-1; // next seed
#declare Angle = Angle + phi; // increase angle
#declare R = R + dR; // increase Radius
#end
[end code]
Post a reply to this message
|
|