How to find coordinates of tangent point on circle, given center coordinates, radius, and end point of tangent line I'm working on a hobby programming project and my mathematic thinking is feeling a bit slow at the moment. Basically, in situations similar to the image I made, given the information I mentioned in the title, I need to be able to calculate the coordinates of the tangent point. (Dimensions are from the origin.) Could you all help me out with finding a straightforward way of doing so? Thanks in advance.

(P.S. In the program, this will actually be in 3D, but once I have the 2D solution I should be able to figure it out in 3D.)
 A: The point at which the tangent line touches the circle (call it $A$), the endpoint of the tangent line (call it $B$), and the center of the circle (call it $C$) form a right triangle. We know the radius of the circle (length of $AC$) and the distance from the center of the circle to the endpoint of the tangent line (length of $BC$).
All that remains is to use the Pythagorean theorem and a bit of trigonometry to find the length of the remaining side, as well as the angle between the remaining side ($AB$) and side $BC$. That should be enough information to find the coordinates of point $A$.
A: You do not actually need trigonometry. Let $AC = r$ be the radius, let point $A$ be at $(x_1, y_1)$, and point $B$ be at $(x_2, y_2)$. You know the values of $r, x_2$, and $y_2$.
First find the length of $AB$ using Pythagoras. Then using the distance formula (Pythagoras again) and squaring both sides, $(y_2 - y_1)^2 + (x_2 - x_1)^2 = AB^2$.
In addition, $(x_1, y_1)$ must lie on the circle, so $x_1^2 + y_1^2 = r^2$. Solving these two equations will give you $x_1, y_1$ in terms of the other variables. There will be two solutions, but you can plot each of them and determine which one is correct for the general setup.
A: The following includes all.
$$ \text{ Power=} T^2, \; C^2 = T^2 +R^2 =  h^2+k^2$$
$$ \tan \gamma =\dfrac{R}{T};\tan \beta =\dfrac{k}{h} $$
$$  \text{Tangent points  } [\;T  \cos (\beta \pm \gamma), T \sin (\beta \pm \gamma)\;] $$
$$(h,k)= (-30, -70).$$

Without Trigonometry  the formulas for tangent point coordinates plug-in and calculations are:
$$\boxed{ \dfrac{hT\mp kR}{C},\dfrac{kT\pm hR }{C}}$$
