Is there a better way to do this?,
Members - Reputation: 126
Posted 15 January 2012 - 01:46 PM
I need to find the point tangent to a circle from the origin (0,0). I know how to do this using two circles kind of like the diagram below. I was planning to us the quadratic equation to find the two tangents points.
I need both tangent points
1: circle center
3: And that the tangent points must pass through the origin (0,0).
I have not used much trig in many years. Is there a better trigonometry based way? I know how to find the lengths of all sides and the interior angles. But not how to find the tangent points.
Crossbones+ - Reputation: 2140
Posted 15 January 2012 - 08:38 PM
Since the tangent is always perpendicular to the line through the center of the circle and the point where the tangent touches the circle, you're dealing with a right angled triangle where you know the hypotenuse (distance from the origin to the center of the circle) and one of the sides (the radius of the circle). So the line segment from the origin to the tangent point on the circle has a length of
L = sqrt(H^2 - R^2)
where H is the length of the line from the origin to the center of the circle and R is the radius of the circle. The angle between the tangent and the line from the origin to the center of the circle is
theta = asin(R/H)
So you can create a vector of length L that is parallel to line from the origin to the center of the circle, and rotate it by +/- theta to get the tangent points.