|
![](/i/fill.gif) |
ingo wrote:
>mmm, all spheres end up on a circle, the length of the arcsegment
>between two spheres is known (1 in this case)........
Got it, I think:
#declare Pos=array[11]
#declare i=0;
#while (i<11)
#declare Pos[i]=<i,0,0>;
#declare i=i+1;
#end
#declare Angle = radians(10*clock);
#declare Length = Pos[1].x-Pos[0].x;
#declare Radius = Length/Angle;
#declare Lcord = (Radius/sin(0.5*pi-(Angle/2)))*sin(Angle);
#declare Ccenter = <-0.5*Lcord, Radius, 0>;
#declare i=0;
#while (i<11)
#if (Pos[i].x=0)
// do nothing
#else
#declare L= Pos[i].x;
#declare Alpha= L/Radius;
#declare Pos[i]=
(vrotate(<0,-radius,0>,<0,0,degrees(Alpha)>))+Ccenter;
#end
#declare i=i+1;
#end
#declare i=0;
#while (i<11)
sphere{ Pos[i],0.2 pigment {rgb <1,0,0>}}
#declare i=i+1;
#end
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
![](/i/fill.gif) |