POV-Ray : Newsgroups : povray.general : 3D Math (Reply to Spider) : Re: 3D Math (Reply to Spider) Server Time
12 Aug 2024 23:18:43 EDT (-0400)
  Re: 3D Math (Reply to Spider)  
From: Spider
Date: 15 Dec 1998 13:55:06
Message: <3676AFD9.3AEDCA9C@bahnhof.se>
Thanx, I'll test it... And, it comes in under the original topic :-)
THe question was "how" and then my guess that didn't work :-)



//Spider

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.