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
Thread 'Is 'Velocity of Transport' a Recognized Term in English Mechanics Literature?'
Here are two fragments from Banach's monograph in Mechanics I have never seen the term <<velocity of transport>> in English texts. Actually I have never seen this term being named somehow in English. This term has a name in Russian books. I looked through the original Banach's text in Polish and there is a Polish name for this term. It is a little bit surprising that the Polish name differs from the Russian one and also differs from this English translation. My question is: Is there...
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
Back
Top