# A line going through a point, how to find it's touching point with a circle.

I have a circle and a point outside of it. I need to find a line passing through this point and only touching the perimeter of the circle (my intuition tells me that there are always two lines like this, is this correct?)

After finding this line (that can be represented as a vector), I need to find the touching point of the line and the circle.

I actually think I figured out the solution, but I'd like to hear if it's wrong.

p  = the point outside of the circle
pc = a vector from the point to the center of the circle.
u  = a normal of pc, normalized and multiplied by the radius of the circle.
v  = pc + u
d  = the touching point of the line and the circle = p + v


Is this correct?

• Downvoter mind explaining? – Aviv Cohn Jul 5 '14 at 15:57

The following is the standard procedure of drawing a tangent from an external point P to a given circle with center C.

(1) Locate the midpoint Q of PC.

(2) Draw another circle using Q as center, QP as radius.

(3) Let the new circle cuts the old circle at R.

(4) PR is the required tangent.

PS. Your intuition is correct. There are two such lines (symmetrically located about PC).

• You are welcome. – Mick Jul 6 '14 at 6:12