POV-Ray : Newsgroups : povray.general : 3D Math (Reply to Spider) : Re: 3D Math (Reply to Spider) Server Time
12 Aug 2024 23:20:23 EDT (-0400)
  Re: 3D Math (Reply to Spider)  
From: Stephen Lavedas
Date: 15 Dec 1998 18:04:55
Message: <3676EC63.51882DC9@virginia.edu>
If there is any interest, I've written a couple of modifications to
allow for Tori and Spirals... Email me and I'll send them out unless
everyone wants them, then I'll post them (They are both roughly this
length, so I'm wondering if posting them here as text would be rude).
I guess I could post them in Scene files, but I don't normally check
that area.  Let me know.  

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.