The quadratic I was talking about (for 2D):
d = sum of radii of the two spheres
dvx = difference in sphere x-velocities (e.g. xv1-xv2)
dvy = difference in sphere y-velocities
dx = difference in sphere x-positions
dy = difference in sphere y-positions
t = time
The quadratic is:
You need to find the solution that is
since the other solution:
is the time at which the balls (had they gone through each other) would separate the
'other side' of
the collision. Note that if the value of t is negative, it means that the collision
has 'already
happened' - i.e. the spheres are going away from each other. Since they won't collide
again on their
present courses, this case can be ignored.
-Chris
Post a reply to this message
|