Elastic Collisions in Two Dimensions
This demonstration illustrates the following techniques:
- using dynamic HTML to create an interactive, Flash-like simulation--in this case, a simulation of objects colliding
on an air hockey or billiards table;
- using PHP to dynamically generate images representing billiard balls and hockey pucks;
- using Cascading Style Sheets (CSS) to render different visual environments (hockey table or billiards table) using
the same HTML code.
You may pause the simulation at any time. When paused, you may "throw" an object by clicking on it and dragging it quickly across the surface,
releasing the mouse button to complete the throw.
*This simulation illustrates the physical principles of conservation of energy and momentum. A perfectly elastic
collision is one in which there is no loss of kinetic energy: part of the kinetic energy of one colliding object is transferred
to the other. Switching from air hockey to billiards changes the dynamics of the collisions: the kinetic energy of a hockey puck varies
as the square of its radius whereas the kinetic energy of a billiard ball varies as the cube. Collisions between large and
small balls are more "dramatic" than those between pucks.