How to find X valie of a point on an arc?

41 Views Asked by At

I have an arc with a start point (Xs, Ys) and an end point (Xe, Ye). Also, I know the direction of movement between them, the center point (Xc, Yc), and the radius. Now I have a point on that arc and I know its (Yp) value and need to find its (Xp) value. It might seem an easy question, but the issue is I have different cases of arcs, so I need a logic that solves all these cases.

1

There are 1 best solutions below

1
On

The equation of the circle is $(x-X_c)^2+(y-Y_c)^2=R^2.$

$\implies X_p=X_c\pm\sqrt{R^2-(Y_p-Y_c)^2}$

Note that you may need to reject one value of $X_p$ depending on the direction of movement between the end points of the arc.