Skip to content
A collection of interactive physics simulations.
JavaScript HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


A collection of interactive physics simulations.

Run online at

Elastic Collision

Simulates an elastic collision between two particles.

Directions: Press Start to run the animation. Press Stop to pause and Start to restart. To reset the particles for another collision, press Reset. Change the mass and initial velocity of the particles if desired, and press Start to run with the updated settings. Click and drag with the mouse to rotate the view, scroll to zoom, and right-click and drag or use the arrow keys to pan around.

Thin Lens

Draws the ray diagram for a thin converging or diverging lens.

The diagram shows three principal rays originating from the object (black arrow): the parallel ray (blue), the vertex ray (green), and the focal ray (red). The image is shown as another black arrow. Actual light rays are shown as solid lines and extended rays are shown as dotted lines. The diagram also shows the optic axis (dashed gray line), vertex (center point), focal points (middle point on each side), and center of curvature (outside point on each side) of the lens.

Directions: To move the object, click anywhere to the left of the lens or use the input boxes to set the object's height and distance from the vertex. Choose the lens type (converging or diverging) by selecting the corresponding button and change the focal length of the lens.

You can’t perform that action at this time.