A collection of interactive physics simulations.
JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
OrbitControls.js
README.md
elastic-collision.html
elastic-collision.js
index.html
thin-lens.html
thin-lens.js
three.min.js

README.md

physics-simulation

A collection of interactive physics simulations.

Run online at https://intrepidcoder.github.io/physics-simulation/

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.