|
![](/i/fill.gif) |
Hi, I'm trying to make the following script place the cylinders evenly on
the sphere, but they're showing up clustered. Any idea why? How can I
place them evenly on the sphere?
The original script was from:
http://www.povray.org/documentation/view/3.6.1/229/#s02_02_01_04_05_i5
Thanks.
#include "colors.inc"
camera {
angle 20
location<-5,10,10>
look_at<0,0,0>
}
light_source { <0, 15, 10> color White }
background { White }
#declare MySphere = sphere { <0, 0, 0>, 1 }
object {
MySphere
texture {
pigment { rgb 1}
}
}
#declare R1 = seed(339);
#declare Cnt = 0;
#while (Cnt<500)
#declare Norm = <0, 0, 0>;
#declare Start = <rand(R1), rand(R1), rand(R1)>;
#declare Inter = trace ( MySphere, Start, <0, 0, 0>-Start, Norm );
#if (vlength(Norm)!=0)
cylinder {
Inter, Inter+Norm, .1
texture {
pigment {color red 1}
}
}
#end
#declare Cnt = Cnt+1;
#end
Post a reply to this message
|
![](/i/fill.gif) |