By · Updated

Gravity and Friction Simulation

Slide a Block Down a Ramp on Earth, the Moon or Mars

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Gravity And Friction works

This gravity and friction simulation shows when a block starts to slide. A block rests on a ramp. Drag the angle slider up and at some point it lets go and slides; drag the friction slider down and the same thing happens. The stats show the angle where sliding begins for the current friction, the block's acceleration down the slope, and its speed. Switch the gravity to the Moon, Mars or Jupiter, and press Drop balls to see a small light ball and a large heavy one fall side by side.

Gravity and friction simulation: getting a good result

This is the inclined-plane experiment from every introductory physics course, run in a 2D physics engine in your browser. Two ideas are on show.

When does a block slide? Gravity pulls the block straight down. On a ramp tilted by an angle θ, part of that pull acts along the slope (proportional to sin θ) and part presses the block into the surface (proportional to cos θ). Friction can resist up to μ times the pressing force, where μ is the coefficient of friction. The block stays put as long as sin θ is less than μ cos θ, that is until tan θ reaches μ. So the critical angle is simply atan(μ): 21.8° for μ = 0.4, 45° for μ = 1, and 0° for a frictionless ramp. That angle is in the stats and it does not depend on gravity at all — the Moon pulls less, but it presses the block into the ramp less too, and the two effects cancel. What gravity does change is how fast the block accelerates once it is moving: g (sin θ − μ cos θ), also shown in the stats.

Do heavy things fall faster? No. Drop balls releases a small light ball and a large heavy one from the same height with no air resistance, and they land at the same moment; the stats give both fall times. Galileo argued this from a thought experiment and it holds because the force of gravity on an object and its resistance to being accelerated both scale with its mass. On the Moon they both take longer, but still land together.

About the simulation. While the block is on the ramp its motion follows the textbook Coulomb model directly — held still while tan θ is at or below the coefficient, otherwise accelerating at g(sin θ − μ cos θ) — using the same value for static and sliding friction, so it will not creep the way a real block sometimes does just above the critical angle. Once it leaves the end of the ramp the physics engine takes over. Speeds are in pixels per second and the ramp is a few hundred pixels long, so treat the numbers as a comparison between settings rather than a lab measurement. Everything runs locally; Pause, Fullscreen and Save PNG work as usual.

FAQ

Why does the critical angle not change when I switch to the Moon?

Lower gravity pulls the block down the slope less, but it also presses the block into the ramp less, and friction is proportional to that pressing force. The two effects cancel, so the block lets go at atan(μ) on every planet. What changes is how fast it accelerates once it is moving.

How is the sliding angle calculated?

The block stays put while tan θ is at or below the coefficient of friction μ, so the critical angle is atan(μ): 21.8° for μ = 0.4, 45° for μ = 1 and 0° for a frictionless ramp. The stats show it for the current friction setting.

Why do the two balls land at the same time?

With no air resistance the force of gravity on an object and its resistance to being accelerated both scale with mass, so every object falls at the same rate. On the Moon both balls take longer, but they still land together.

Are the speeds real units?

No. Speeds are in pixels per second and the ramp is a few hundred pixels long, so use the numbers to compare settings against each other rather than as a lab measurement.

See also: all Simulations & Screensavers tools, Images, Audio, Video & Screen, PDF, SVG, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools