Skip to content
/ Mechanics simulator

Mechanics simulator

Pick a situation, set the parameters and run the animation: path, stroboscopic view, vectors, graphs and energies update live, with or without friction. For high school and university physics.

How to use the simulator

  1. Pick the situation: free fall, projectile, inclined plane, simple pendulum or mass-spring, or start from an example.
  2. Set the parameters (speed, angle, mass, length, stiffness…), gravity (Earth, Moon, Mars, Jupiter) and friction.
  3. Run the animation or drag the time slider. The stroboscopic view shows positions at regular intervals, with velocity and acceleration vectors.
  4. Read the graphs (positions, speeds, angle, kinetic, potential and mechanical energy) and the results. The dashed curve is the ideal model (no friction, or small angles for the pendulum).

How it is computed

The equations of motion (Newton's second law) are integrated numerically with the 4th-order Runge-Kutta method, with a step far smaller than the motion's duration, so results stay valid with friction or at large angles, where no simple formula exists. Air drag is a force opposite to the velocity, proportional to v (low speeds) or v² (high speeds).

Frequently asked questions

Why is the range greatest at 45°?

Without drag and from the ground, the range is v₀² sin(2α) / g, greatest when sin(2α) = 1, i.e. α = 45°. With air drag or from a height, the best angle is lower.

Does the pendulum's period depend on amplitude?

Slightly: T₀ = 2π√(L/g) only holds for small angles. At 30° the period is about 1.7% longer; at 90°, about 18%.

See also: the optical bench and the RC, RL, RLC circuit simulator.

Guided activities

1. Projectile motion

Launch a projectile at 20 m/s and 45°, from the ground, on Earth, without drag. Theory gives a range of v₀² sin(2α)/g ≈ 40.8 m, a maximum height of v₀² sin²α/(2g) ≈ 10.2 m and a flight time of 2v₀ sin α/g ≈ 2.88 s. Check these in the results, then:

2. Simple pendulum

With L = 1 m, the small-oscillation period is T₀ = 2π√(L/g) ≈ 2.01 s. Compare with the measured period at 10°, 45° and 90° using “compare with the small-angle model”: the gap grows with amplitude. Add damping to watch the amplitude decay.

3. Mass on a spring

A 0.5 kg mass on a 20 N/m spring oscillates with period T = 2π√(m/k) ≈ 0.99 s, whatever the amplitude. Double the mass: the period is multiplied by √2. With damping, compare light damping and critical damping.

4. Inclined plane

On a 30° slope with friction coefficient μ = 0.2, the acceleration is g(sin α − μ cos α) ≈ 3.21 m/s², against 4.9 m/s² without friction. If tan α ≤ μ, the block stays put: see the “block held by friction” example.

Using the energy graph

The energy graph shows kinetic energy, potential energy and their sum. Without friction, mechanical energy stays constant: the curve is flat. With friction it decreases, and the loss equals the work done by friction. It is the most direct check of the work-energy theorem.

In the classroom

Guide written and checked by Erwan Hautot · updated 3 November 2026.