- #1
ferret_guy
- 18
- 0
I am having trouble calculating if two objects with initial positions and velocity vectors will come within a given distance of one another and if so calculating where the closest approach is. Can anyone point me in the right direction?
My initial thoughts are that both are linear functions where:
[itex]d=tv[/itex]
[itex]y=tv(cos \theta )+y_{i}[/itex]
[itex]x=tv(sin \theta)x_{i}[/itex]
The distance is:
[itex]d = \sqrt {( {x_1 - x_2 })^2 +( {y_1 - y_2 })^2}[/itex]
Expanding to:
[itex]d = \sqrt {( {(tv_{2}sin \theta_{2}+x_{2_{i}})- (tv_{1}sin \theta_{1}+x_{1_{i}}) })^2 +( {(tv_{2}cos \theta_{2}+y_{2_{i}})- (tv_{1}cos \theta_{1}+y_{1_{i}}) })^2 }[/itex]
My next thought is to take the derivative with respect to time to find the turning point of the graph and thus the closest approach to one another. If the turning point is when t is negative then t0 is the closest approach and if it is greater than t0 then the value is the closest approach
My initial thoughts are that both are linear functions where:
[itex]d=tv[/itex]
[itex]y=tv(cos \theta )+y_{i}[/itex]
[itex]x=tv(sin \theta)x_{i}[/itex]
The distance is:
[itex]d = \sqrt {( {x_1 - x_2 })^2 +( {y_1 - y_2 })^2}[/itex]
Expanding to:
[itex]d = \sqrt {( {(tv_{2}sin \theta_{2}+x_{2_{i}})- (tv_{1}sin \theta_{1}+x_{1_{i}}) })^2 +( {(tv_{2}cos \theta_{2}+y_{2_{i}})- (tv_{1}cos \theta_{1}+y_{1_{i}}) })^2 }[/itex]
My next thought is to take the derivative with respect to time to find the turning point of the graph and thus the closest approach to one another. If the turning point is when t is negative then t0 is the closest approach and if it is greater than t0 then the value is the closest approach
Last edited: