views:

61

answers:

2

I am working in c# with directX, i need to find the intersection point between two arcs I searched the net but didn't find anything. I have StartPoint,EndPoint,StartAngle,EndAngle,Centre,Radius for both Arcs, now i need Algorithum or formula for finding intersection points between the two Arcs.

A: 

Draw a complete circle for both the arcs using (the maths circle equation) the same starting & ending points of both the Arcs then check whether theres any point common between the 2 circles if YES then check whether that common point lies between the starting points & ending points of both the arcs if YES then Arcs intersect.

(xh)2 + (yk)2 = r2

where h and k are the x- and y-coordinates of the center of the circle and r is the radius.

KhanZeeshan
Keep in mind the "2" in the above equation is POWER of the variable.
KhanZeeshan
Took the liberty of making the formula readable.
Joey
thanks.I'm new to Stack-Overflow so i didn't know how to do that.
KhanZeeshan
+1  A: 

I have no idea about the embedded functionality in this case. Just algorithm description.

  1. Check the intersection of circles. Simply compare distance between center points and sum of the radii. Arcs can intersect only in the case of circle intersection.
  2. Determine intersection points of two circles (maybe only one if you consider touch case). Here is some math description of this.
  3. For each of the intersection points calculate angle values (simple use of inverse trigonometric formulas). Then check that this values are lay in the interval [StartAngle;EndAngle] for two circles.

UPD: Also, you have to consider coincident circles and return arc intersection (maybe infinite number of points)

MAKKAM
+1 for the nice math link
sje397