Finding the a circle's tangent line which intersects a given point

Click For Summary

Homework Help Overview

The discussion revolves around finding a tangent line to a circle that intersects a specified point in a 2D space. The original poster is seeking the coordinates of both the intersection point and the point on the circle, given the circle's center and radius.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to derive the tangent line using geometric and algebraic methods, including visualizations. Some participants suggest geometric constructions involving bisecting lines and creating new circles. Others raise questions about the specific equations needed to find tangent points and clarify variables mentioned in the algebraic approach.

Discussion Status

The discussion has progressed with participants providing geometric insights and algebraic formulations. Clarifications have been made regarding the equations involved, and the original poster has indicated a resolution to their understanding after receiving assistance.

Contextual Notes

There are mentions of potential typos in the equations and the original poster's self-identified gaps in knowledge regarding the algebraic methods discussed. The conversation reflects a mix of attempts at problem-solving and seeking clarification on mathematical concepts.

jla2125
Messages
16
Reaction score
0

Homework Statement


So, it's my understanding that there must exist a line which is tangent to a given circle and intersects a given point in 2D space. I'm trying to find that line. Any form will do, but I'm currently aiming for the coordinates of the two points: the intersection point, and the point that lies on the given circle. I already have the intersection point, and the circle's location, and the circle's radius.


Homework Equations


None that work...


The Attempt at a Solution


After several hours of fiddling, this is what's given me the best approximation so far. However, it doesn't work for all positions of the circle.

tangentx = circlex - r;
tangenty = -r * sin(\theta) + circley;

I've gone through several iterations of things like this, and I have a sort of visualization I whipped up in Flash, as that's where this whole thing will eventually end up. Give it a go http://jeremyabel.com/secret/rubber_band.html" Grab the red line, and you'll see the blue circle, along with the yellow line, which is being drawn according to the equation above. In the case above, theta = the angle of the green center line. As you can see, it works good enough for my purposes when you're below the line and even above it, but once you go to the upper right, it all goes down hill from there...

Any help would be appreciated!
 
Last edited by a moderator:
Physics news on Phys.org
Geometrically, you can do this: Draw the line connecting the point to the center of the circle. Bisect that line segment. Using that point as center and the distance from that point to the center of the circle (half the distance from the center of the circle to the given point, as radius strike a new circle. The two points at which the circles cross will be points where the line from the given point will be tangent to the given circle.

That is true because any point on a circle makes a right angle between the lines from the ends of any diameter to that point.

Algebraically, you can do this:

Suppose the given point is (x_0, y_0) and the circle has center at (x_1, y_1) and radius r. The midpoint between the center of the circle and the given point is ((x_1+ x_0)/2, (y_1+ y_0)/2) and half the distance is

\sqrt{(x_1- x_0)^2+ (y_1- y_0)^2}/2.

The given circle has equation
(x- x_1)^2+ (y- y_1)^2= r^2
and the circle with center at the midpoint, radius equal to half the distance between the given point and center of the circle has equation

(x- (x_0+ x_1)/2)^2+ (y- (y_0+ y_2)/2)^2= \frac{(x_1- x_0)^2+ (y_1-y_0)^2}{4}.

Solve those two equations for the points at which the line from the given point is tangent to the circle. You can then use the "two-point" formula to find the equation of the circle.
 
Last edited by a moderator:
No freakin' way! I can't believe I didn't see that before! That circle trick's pretty neat.

Now, about that algebra: which two equations do I need to solve to get the points? are you referring to the last two? Also, the last equation has a variable I haven't seen elsewhere: (y_2). What is that referring to? I take it that if I solve that last equation for x and y I'll get the coordinates of the tangent point? Sorry I'm not up on all this, I haven't done this stuff since high school...
 
There were only two equations in my post!

They were
(x- x_1)^2+ (y- y_1)^2= r^2
and
(x- (x_0+ x_1)/2)^2+ (y- (y_0+ y_1)/2)^2= \frac{(x_1- x_0)^2+ (y_1-y_0)^2}{4}

The "y_2" was a typo. Thanks for pointing it out.
 
Thanks for the help! I got it all figured out pretty quickly after that. If anyone's interested, here's how I did it programmatically:

given circle's center points c1 and c2, and circle's radii r1 and r2:

d_x = c_2_x - c_1_x
d_y = c_2_y - c_1_y
d_a = d_x^{2} * d_y^{2}

a = ({r_1{}}^{2} - {r_2{}}^{2} + d_a) / 2d
h = \sqrt{{r_1{}}^{2} - a^{2}}

x_2 = \frac{c_1_x + a(c_2_x - c_1_x)}{d}
y_2 = \frac{c_1_y + a(c_2_y - c_1_y)}{d}

p_1 = (x_2 + h(c_2_y - c_1_y) / d, y_2 - h(c_2_x - c_1_x) / d))
p_2 = (x_2 - h(c_2_y - c_1_y) / d, y_2 + h(c_2_x - c_1_x) / d))

p_1 and p_2 are the two intersection points.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
5
Views
3K
Replies
7
Views
3K
Replies
1
Views
9K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
25
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K