HTML and CSS Reference
In-Depth Information
Figure 11-4.
A two-dimensional collision, rotated
That angle between the two balls is important; that's the
angle of collision.
It's the only part of the ball's
velocities that you care about—the portion of the velocity that lies on that angle.
Take a look at the diagram in Figure 11-5. Here, we've added vector lines for the
vx
and
vy
for both
velocities. The
vx
for both balls lies exactly along the angle of collision.
Figure 11-5.
Draw in the x and y velocities.
Because the only portion of the velocity you care about is the part that lies on the angle of collision—which
is now your
vx
—you can just forget all about
vy
. And, as you can see in Figure 11-6, it's been taken out of
the diagram.
Figure 11-6.
All you care about is the x velocity.