Chapter 11

Collisions

This chapter deals with an important subject that is bound to crop up in any animation or simulation: collisions. More precisely, it focuses primarily on collision resolution—how to respond to collision events—as opposed to collision detection, which was discussed to some extent in Chapter 2. Both collision detection and collision resolution are vast subjects in their own right. The intricacies of collision detection for general objects are outside the scope of this book (because we focus on the physics), but things are much simpler for collisions between particles, which is the main subject of this chapter. Similarly, it is impossible to cover all aspects of collision resolution in a single chapter. We shall, therefore, concentrate on some of the basics that are most commonly encountered. Specifically, we shall restrict attention to collisions of particles with fixed walls (bouncing) and with other particles.

Topics covered in this chapter include the following:

  • Collisions and their modeling: This brief introductory section explains what collisions are and outlines the approach we will take to model them.
  • Bouncing off horizontal or vertical walls: By wall, we mean any fixed flat surface that a particle can bounce off of. We start with the example of a ball bouncing off a horizontal or vertical wall. The collision resolution in this case is simple. The effects of energy loss by bouncing or wall friction can also be implemented in a straightforward way.
  • Bouncing off inclined walls: Things get a lot more complicated if the wall is inclined. A general method will be given to resolve collisions with walls of any inclination.
  • Collisions between particles in 1D: When particles move along the line joining them, collisions are one-dimensional and can be resolved in a straightforward way by applying the laws of conservation of momentum and energy.
  • Collisions between particles in 2D: We discuss a general method for resolving more complicated two-dimensional collisions between particles that occur at an angle to the line joining them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.167.107