Re: Math/Geometry Guru anyone?
Re: Math/Geometry Guru anyone?
- Subject: Re: Math/Geometry Guru anyone?
- From: "Mike Miller" <email@hidden>
- Date: Tue, 5 Dec 2000 18:41:40 -0600
Jason Bourque <email@hidden> asked:
>
I am drawing pie charts in Ilustrator 9 and need an equation to find the
>
intersecting point of a line extended from the center point the length of
>
the radius.
>
>
Diameter 72 pts
>
Radius 36 pts
>
Center point coordinate 0,0
>
Angle of line extended 45
>
>
Any ideas on the point coordinates of the intersection of the circle?
IIRC:
on findIntersectingPoint(angle, radius)
set thePoint to {x:0, y:0}
set x of thePoint to cosineOf(angle) * radius
set y of thePoint to sineOf(angle) * radius
return thePoint
end findIntersectingPoint
You can use an OSAX for the math functions or you can get FindIntersectingPoint from the ESG Labs snippets page:
http://www.esglabs.com/snippets/
FindIntersectingPoint has vanilla sine/cosine functions (approximated with a table).
Let me know if I've messed up the math. :)
Mike Miller
ESG Labs
http://www.esglabs.com/