Calculating points of a mega circle..
tjframe at gmail.com
Tue Sep 13 13:30:57 CDT 2005
Fantastic! Works perfectly!
Thanks so much.
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
> Any ideas how to go about this?
> - TJ
> Something like this would do it...
> 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