Hi Ppl,

Brad, here's some messy lingo that might help somehow, i'm not so 
sure as to what circumference are but this defines points on a circle 
for me each and every time...

nJoy,

Yariv

---------------------------------------
on exitFrame me
   tMargin=10
   midPoint=point(the stageRight-the stageLeft,the stageBottom-the stageTop)/2
   radius=min(midPoint)-tMargin
   points=60
   repeat with i=1 to points
     rot=i*(360./points)
     sprite(i).rotation=rot
     sprite(i).loc=circleBorder(midPoint,rot,radius)
   end repeat
end

on circleBorder mid,deg,rad
   if deg>=360 then deg=0
   dirs=[[1,-1],[1,1],[-1,1],[-1,-1]]
   alphas=[90-deg,deg-90,270-deg,deg-270]
   flatAdd=[[0,-rad],[rad,0],[0,rad],[-rad,0]]
   quarter=deg/90+1
   quarter=value(string(quarter).char[1])
   if 1.0000*deg/90=integer(deg/90) then -- right angle
     newloc=mid+flatAdd[quarter]
   else
     ydif=sin(alphas[quarter] / 57.2957795786)*rad
     xdif=cos(alphas[quarter] / 57.2957795786)*rad
     newloc=mid+([xdif,ydif]*dirs[quarter])
   end if
   return newloc
end
---------------------------------------
>Hope someone can help me with this. I'm totally lost when it comes to math.
>I'm importing a list of names and need to arrange them around the
>circumference of a circle, I will know the circumference but the number of
>names will vary.
>I want to average the names around the 360 so they are evenly spaced.
>This sounds like a simple trig problem (I'm guessing)
>Any help or URL pointers would be greatly appreciated
>BTW Are there any sites that have basic math/trig functions in a simple to
>understand format around.
>
>Thanks in advance
>Brad
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to