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
Thread 'Beam on an inclined plane'
Hello! I have a question regarding a beam on an inclined plane. I was considering a beam resting on two supports attached to an inclined plane. I was almost sure that the lower support must be more loaded. My imagination about this problem is shown in the picture below. Here is how I wrote the condition of equilibrium forces: $$ \begin{cases} F_{g\parallel}=F_{t1}+F_{t2}, \\ F_{g\perp}=F_{r1}+F_{r2} \end{cases}. $$ On the other hand...
I know that mass does not affect the acceleration in a simple pendulum undergoing SHM, but how does the mass on the spring that makes up the elastic pendulum affect its acceleration? Certainly, there must be a change due to the displacement from equilibrium caused by each differing mass? I am talking about finding the acceleration at a specific time on each trial with different masses and comparing them. How would they compare and why?
Back
Top