|
|
"Hugo Asm" <hua### [at] post3teledk> wrote in
news:3eb8c8a3$1@news.povray.org:
>
> No insults. :o) But how do you compute the almost-even distribution,
> perhaps by subdividing a triangle? If you share your code .. hmm..
> I'll be grateful but it's up to you.. Now you could add some media, or
> maybe you already did.
>
> Regards,
> Hugo
>
>
I just make 2 cycle, the outer scans the "meridians" of the sphere with a
fixed step, the inner scans the "parallels" (is the right word ?), with a
step that depends on the size of the parallel itself. Here is a snippet
of the code.
#declare fori = object { union {
#declare zi=0;
#while (zi<180)
#declare zrad=sin(zi*pi/180);
#if (zrad=0)
#declare xstep=360;
#else
#declare xstep=360/(30*zrad);
#end
//#declare xstep=int(xstep/5)*5;
#debug str(xstep,5,2)
#debug "\n"
#declare xi=rand(rr)*xstep;
#while (xi<360)
cylinder { <0.9*sin(zi*pi/180),0.9*cos(zi*pi/180),0>
<1.1*sin(zi*pi/180),1.1*cos(zi*pi/180),0>,
0.05 rotate <0,xi,0> }
#declare xi=xi+xstep;
#end
#declare zi=zi+10;
#end
} }
Post a reply to this message
|
|