Solving when a circle and rotating line collide
I am trying to solve for when a circle and a line rotating about a point will collide:
I am trying to solve for T.
The arrow from Bo to B represents Bv or the velocity of the circle.
The arrow from the bottom line to P represents θv or the change of the rotating line.
The dashed line and circle represents a possible solution to the problem and I only put it there to help me think through the problem.
L: length of the rotating line (CP)
C: point the line rotates around
Cx, Cy: components of C
Bo: initial point/location of the circle
Box, Boy: components of Bo
Bv: velocity of the circle
Bvx, Bvy: components of Bv
r: radius of the circle
θ: initial rotation of the rotating line (CP)
θv: rotational velocity of the rotating line (CP)
P: end point of the rotating line (CP) at time T
Px, Py: components of P
N: normal of the line rotating line (CP) at time T
Nx, Ny: components of N
B: point/location of the circle at time T
Bx, By: components of B
D: distance from the center of the circle (B) to the rotating line (CP) at time T
T: time (from 0 to 1)
In the last equation t is confusing and a bad choice for a variable. It simply represents θ + θv * T as stated.
Here is my reasoning:
At the top I have the positions of the endpoint of the rotating line P and the center of the circle B defined as functions of time T. In order to determine the position of the collision, I must find at what time T the distance D from the center of the circle B and the line CP is equal to the radius of the circle r, or D - r = 0. The distance from a point to a line can be found by taking the dot product of the normal of the line (N) and the point (B). Knowing this I simply expand the equation until all the variables are present and I am left with the final equation at the bottom. I re-condensed the equation into terms of a, b, and t hoping it would help me solve the problem. If I can get t out of the sine and cosine functions, I would be able to solve the problem.
I can't figure out what to do from here. I have been staring at this for days.