Finding Where on a Circle a Line Segment will Intercept

138 Views Asked by At

Assume the following:

  1. A known point in space.
  2. A line segment beginning at the above point. The length of the segment is known, but the slope is not.
  3. A circle with a known center point and radius.

Given that data, I need to calculate the coordinates of the point where the line segment would end on the circle (if it is possible that the line segment could end on the circle). How could I calculate these coordinates?

1

There are 1 best solutions below

1
On

The line segment must end on a point with distance $d$ from $(x_1, y_1)$, so it has equation $(x-x_1)^2 + (y-y_1)^2 = d^2$. The equation of the known circle is $(x-x_2)^2 + (y-y_2)^2 = r^2$, and so we solve these two equations simultaneously.

Alternatively, it is possible to use the length of the tangent segment, the radius of the circle, and the distance between the points $(x_1,y_1)$ and $(x_2, y_2)$, noting that the triangle forms a right-angled triangle, to find the angle of the intersection point on the circle via trigonometry.