Re:Math help!!
Quote
Andrew Rossmann wrote in message <360693E4.C637CDF3@no_junk.ntsource.com>...
> I'm trying to draw some arcs. I know the 'direction' (CW or CCW),
>start point, end point, and either the radius or centerpoint. I need to
>convert that to either centerpoint and angle, or three points on the
I don't have time to work out the details for you, but perhaps this will
get you started.
If I understand you correctly you have two points A and B on the circle
and the center point, C.
You can use the arctan2 function to get the angle between a radius line
and the X-axis (if I remember correctly). So something like
arctan2(Ay-Cy, Ax-Cx) should give you the angle from the X-axis to
point A and arctan2(By-Cy, Bx-Cx) should give you the angle from
the X-axis to the point B. Draw your arc by creating intermediate
points. These intermediate points will be something like
(Cx + R*COS(theta), Cy+R*SIN(theta)).
I you need an arctan2 function, look on the Delphi Math Functions
pages in my Computer Lab.
I hope I didn't trade haste for accuracy in this reply.
efg
_________________________________________
efg's Computer Lab: http://infomaster.net/external/efg
Earl F. Glynn E-Mail: EarlGl...@att.net
Overland Park, KS USA