|
|
Hi..
I'm put at a loss with a little problem I have..
How do I, with a #while or #macro, make sure a sphere's center is inside another
sphere
???
I can't seem to succeed... I'm probably at the wrong track with this:
please note, this is from memory.
#declare Radius = 11;
#declare N = 5000;
#declare C = <0,8,0>;
#declare s = seed(pi);
#while (N>0)
sphere {
C
0.005
pigment { White } finish { ambient 1 }
#local vd=<rand(s)*Radius,rand(s)*Radius,rand(s)*Radius>;
#local vld = vlength(vd-C);
#while( (vld>Radius) & (vld<-Radius))
#local vd=<rand(s)*Radius,rand(s)*Radius,rand(s)*Radius>;
#local vld = vlength(vd-C);
#end
}
#declare N=N-1;
#end
Am I totally off here ???
This doesn't seem to get the desired result, but as I've understood it, the vecor
length
from the center of the sphere equals the radius of the sphere...
//Spider
Post a reply to this message
|
|