- #1
jla2125
- 16
- 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([tex]\theta[/tex]) + 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: