Derivation of motion equations for collision detection

AI Thread Summary
The discussion focuses on deriving motion equations for a car-accident prediction model, specifically the mintime and mindist equations. The mintime equation is derived by expressing the distance between two moving points as a function of time and finding the time at which this distance is minimized. The mindist equation is calculated by substituting the mintime into the distance formula to evaluate the minimum distance at that time. Participants clarify that the time-derivative of the distance function must be set to zero to find the minimum distance. The conversation emphasizes the importance of understanding these derivations for accurate collision detection modeling.
M Omran
Messages
2
Reaction score
1
Dear all,

I am working on a car-accident prediction model. I found the following equations here that worked in my model. However, I could not figure out how the equations were derived. Could anyone help me in understanding the derivation of the mintime and mindist equations (Steps 3 and 5 below).

1. For each car/object/point, you know the following:

initial x position
speed in x direction
initial y position
speed in y direction

2. For two points a and b then, let's define the following variables:

xa0: initial x position of point A
xat: speed in x direction of point A
ya0: initial y position of point A
yat: speed in y direction of point A

xb0 initial x position of point B
xbt speed in x direction of point B
yb0 initial y position of point B
ybt speed in y direction of point B

3. The distance between to points is given by Pythagoras. By expressing this distance as a function of time (based on the given variables above), then we can solve for the minimum possible distance. If we do this then we get a formula which will give us the time of minimum distance. The result is the following formula:

mintime =
-(xa0*xat - xat*xb0 - (xa0 - xb0)*xbt + ya0*yat - yat*yb0 - (ya0 - yb0)*ybt)
/
(xat^2 - 2*xat*xbt + xbt^2 + yat^2 - 2*yat*ybt + ybt^2)

4. The distance at any time t is given by the following expression:

dist = sqrt((t*xat - t*xbt + xa0 - xb0)^2 + (t*yat - t*ybt + ya0 - yb0)^2)

It depends on the given variables in addition to t.

5. To calculate the minimum distance then, you just evaluate it using the minimum time you calculated previously. So with t = mintime:

mindist = sqrt(
(mintime*xat - mintime*xbt + xa0 - xb0)^2
+
(mintime*yat - mintime*ybt + ya0 - yb0)^2
)

Many thanks in advance
 
Physics news on Phys.org
(4) is clear?
Calculate its time-derivative. At the minimal distance, the derivative is zero. That gives you an equation that can be solved to find the time.

(5) is just plugging the time from (3) into (4) and simplification of the expression.
 
  • Like
Likes M Omran
mfb said:
(4) is clear?
Calculate its time-derivative. At the minimal distance, the derivative is zero. That gives you an equation that can be solved to find the time.

(5) is just plugging the time from (3) into (4) and simplification of the expression.

Thanks a million for the crystal clear answer. It is much appreciated.
 
  • Like
Likes mfb
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top