POV-Ray : Newsgroups : povray.general : 3D Math (Reply to Spider) : Re: 3D Math (Reply to Spider) Server Time
12 Aug 2024 23:22:32 EDT (-0400)
  Re: 3D Math (Reply to Spider)  
From: Stephen Lavedas
Date: 15 Dec 1998 17:27:19
Message: <3676E392.7BF3E941@virginia.edu>
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

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