PDA

View Full Version : Rotating Line to Touch Circle


sloeblack
May 10, 2005, 06:53 AM
A line starts outside a circle at point A. It passes through the centre of the circle and ends inside the circle at point B. With point A remaining fixed, I want the line to rotate so that point B touches the circle. The following variables are known:
Distance AB
Distance from A to circle centre
Circle radius

How do I calculate the angle through which the line must rotate?

Doddddy
Jul 27, 2005, 03:58 PM
here is how you do. You take it analiticly. First let's say the origin is the point A. so A(0,0). Then take C(d,0) and B(d2,0).

now we write the circle equation:
C1: (x-d)^2+y^2=r^2

if you look better you see that you actually rotate the line on a circle. So let's write that circle's equation:
C2: x^2+y^2=d2^2

now intersecting the two circels you can get the coordonates of the point(s) that you need for finding the angle (the point where the line will touch the circle C1)

from C1&C2 => x12=(d^2+d2^2-r^2)/2d => y1,y2

once you have the coordonates for the point(s) touching the circle (let's say point D and D') you just have to find the equation of AC and of AD and calculate the angle between (tg(angle)=(m1-m2)/1+m1*m2 or something like this)

sloeblack
Jul 29, 2005, 06:25 AM
Thanks for taking the time to repy. Looks good, I'll give it a try and see how it goes.

fizixx
Aug 10, 2005, 11:52 AM
Do you know anything about the circle?