isc_cline_carc
The two arcs, arc1 and arc2, with radius r1 and r2, are drawn with black:
For the rest of the cases, calculate the circle-circle intersection points:
- corner case: concentric arcs; if they are of the same radius, calculate overlap and return those, else 0 overlap possible
- vD is the vector between the two center points, it's normal vector is nD
- D is the length of vD, the total distance
- if D > r1+r2, there is no intersection, return 0
- the vector between the two intersection points is perpendicular to vD
and intersects vD in point isp0
- if D == r1+r2, there's only one intersection, isp0
- the distance between arc1's center to isp0 is d1, between arc2's
center to isp0 is d2; D=d1+d2
- the distance between isp0 and an intersection point is y
- because of right angle triangles: d1^2 + y^2 = r1^2 and d2^2 + y^2 = r2^2;
solving for d1 yields: d1=(r1^2-r2^2)/(2*D) + D/2
- ... and y = sqrt(r1^2-d1^2)
- if y is invalid (sqrt on negative), it is a corner case: smaller arc
within a bigger one with no intersection (return 0)
Thus isp0 is: (arc1's center) + vD * d1. Knowing isp0,
the resulting intersection points are: isp0 + nD * y and isp0 - nD * y.
Check if each point is on both arcs using offsets.