|
![](/i/fill.gif) |
I like this method a lot better. It allows for easier adaptation into
spirals, tori and cylinders. (While I was modifying your code Spider, I
was thinking.. this would be easier in a polar or spherical system) I
will be playing some games with this now... Thanks Abe.
Steve
Abe wrote:
>
> Pardon me for being intrusive . . . but I wanted to share an alternate
> solution to this problem which occured to me. It is a bit cheaper in parsing
> time (though not much) and loop cycles.
>
> #declare Radius = 11;
> #declare N = 2500;
> #declare C = <0,8,0>;
> #declare s = seed(pi);
> #while (N>0)
> sphere {
> <0, 0, 0>
> 0.25
> pigment { rgb <1,1,1>} finish { ambient 0.2 diffuse 0.6 }
> #local D = pow(rand(s), 1/3)*Radius; // cube root accounts for
> increase in rad. wrt vol. Changing this can change the radial distr. of
> spheres.
> #local R = < rand(s)*360, rand(s)*360, rand(s)*360,>;
> translate x*D
> rotate 45
> rotate R
> translate C
> }
> #declare N=N-1;
> #end
>
> . . . for what it's worth. :-)
>
> Abe
Post a reply to this message
|
![](/i/fill.gif) |