I am looking for guidance on how to solve a complicated moving geometry problem.
Let's say I have 2 objects.
Object #1 is a very small ball on a string at fixed point(x,y,z) with speed, S. It can move in any direction provided it stays on a path dictated by the string. And the length of the string is increasing at a fixed rate. The ball is infinitely small in this example. Radius << smaller than the cylinder.
The other end of the string is attached to the origin at 0,0,0.
Object #2 is a stationary inclined cylinder of diameter D and length L.
I want to swing the ball such that it hits the cylinder tangentially. The cylinder lies within the radius of the string that the ball is attached to.
For simplification, we could say that the axis of the cylinder passes through 0,0,0.
I want to calculate the following:
1) The vector the ball should be aimed at to collide tangentially with the cylinder.
2) The time to collision.
3) The point (x,y,z) of collision.
The cylinder surface can be modelled as
(x-u) ^2 + (y-v)^2 + (z-w)^2 = 3/8 D^2.
Where u, v and w are on a line that forms the center of the cylinder, as
au + by + cz = k a,b,c and k are constants.
The ball on the string can be modelled as:
position(x,y, z) = r cos(theta) sin(phi) , r cos(theta) cos(phi), r sin(theta))
theta and phi are known at the start, but will change as the ball travels.
speed of ball = S Assume it stays constant throughout its trajectory..
where r = the length of the string and theta and phi are the angles the string makes with the various planes. The string gets longer at a constant rate, so...
dr/dt = K
dposition/dt = ... the whole long derivative of the position equation.
Mass and gravity can be ignored.
This is where I am stuck. How do I calculate the initial trajectory vector of the ball such that it strikes the cylinder tangentially ?
I can represent the surface of the cylinder as a set of lines parallel to the cylinder axis at radius R. If the ball strikes the cylinder tangentially the velocity of the ball will be perpendicular to the contact point and the cylinder axis.