Solution for finding intercept point of two moving objects (XY plane)

581 Views Asked by At

This problem is limited to 2 dimensions (XY plane) + time.

There are two objects, A and B.

Both objects move in a straight line. Object A has an initial speed and decelerates (constant deceleration). Object B's speed is constant.

Initially, A is at InitialPointA. It has an initial speed InitialSpeedA. It's moving in direction DirectionA. It decelerates at DecelerationA.

Initially, object B is at InitialPointB. It moves at a constant speed of SpeedB.

Need to find the direction object B must travel in order to intercept (hit) object A at the earliest point in time.

Per "amd"'s suggestion, I'm editing/adding the approach I've taken so far: (Note: DirectionA is a unit vector)

CurrentPointA(t) = ((InitialSpeedA * t - ((DecelerationA * t^2) / 2)) * DirectionA) + InitialPointA

The distance B must travel to intercept A at the current time t is

InterceptDistanceB = length(InitialPointB - CurrentPointA(t))

The distance B travels during time t is simply SpeedB * t

What must be found is the time t where

InterceptDistanceB = SpeedB * t

i.e.,

length(InitialPointB - CurrentPointA(t)) = SpeedB * t