POV-Ray : Newsgroups : povray.advanced-users : Fishtail math ><}}}*> : Re: Fishtail math ><}}}*> Server Time
30 Jul 2024 14:23:09 EDT (-0400)
  Re: Fishtail math ><}}}*>  
From: ingo
Date: 20 Nov 1999 07:43:44
Message: <8E8487412seed7@212.120.113.81>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.