I've spent so many hours on this I can feel my sanity slowly slipping. So any help would be really truly appreciated. I'll try and be as succinct as possible.
I have a circle on a 2D plane. I know the cartesian coordinates for it's central point(C) and the radius(R).
My confusion stems from this problem. When provided with a point on the plane outside of the circle; I can calculate the point(P) on the circle's circumference closest to that point.
What I want to do is determine the (x,y) coordinates of 2 points on the circumference. Let's call them P1 and P2. P1 and P2 are two ends of an arc. The arc is of a fixed length(X). P is the midway point between P1 and P2. As such, the arc length from P to P1 & P to P2 are both X/2.
In short: given C, R, P, X ; I need to calculate P1 and P2.
I am trying to code this in c++ but any suggestions or pseudo-code would be great.
EDIT: X is an arc length, not a straight line between P1 and P2