Calculating points of a mega circle..

TJ Frame tjframe at gmail.com
Tue Sep 13 14:30:57 EDT 2005


Fantastic! Works perfectly! 
 Thanks so much.
 - TJ

 On 9/13/05, Gordon Tillman <got at mindspring.com> wrote: 
> 
> Hi TJ, 
>  
>  Hi folks 
>  Anyone know how I would calculate the points of a circle given a specific 
> number of required points and a massive radius. For example I'm looking to 
> generate a list of 7200 points that describe a circle with a radius of 
> 999999
>  Any ideas how to go about this?
>  Thanks,
>  - TJ
> 
> 
>  Something like this would do it...
> 
>  --gordy
> 
> 
>  function getCirclePoints pXOrigin, pYOrigin, pNumPoints, pRadius
> local tIncr, tTheta, tTwoPi, tX, tY, tPoints
> put pi * 2 into tTwoPi
> put tTwoPi / pNumPoints into tIncr
> put 0 into tTheta
> repeat pNumPoints times
> put pRadius * cos(tTheta) + pXOrigin into tX
> put pRadius * sin(tTheta) + pYOrigin into tY
> put tX & "," & tY & return after tPoints
> add tIncr to tTheta
> end repeat
> return tPoints
> end getCirclePoints
> 
>



More information about the use-livecode mailing list