0.000 s
Finish order
| Track | Length | Time | Behind |
|---|
Your track
Drag the handles on the canvas to bend your own track. It is scored by the same exact formula as the others.
| Measure | Value |
|---|
Put several marbles on the same track at different heights and let them all go at once. On one of these three shapes they land together — every time, from any height. On the other two they do not come close.
0.000 s
| Released at | Arrives | Difference from the first |
|---|
Nothing on this page was copied from a textbook answer. A search starts from a straight ramp and bends it; a second method, borrowed from optics, draws the same curve without optimising anything; a third integrates Newton's second law in time. All three are below, with the places where each one stops working.
Does a search find it?
The track is cut into N straight pieces whose horizontal spacing is fixed. Only the depths move. Each piece has constant acceleration, so a polyline's descent time is exact arithmetic, not an approximation — the only error is that a polyline is not a curve.
| Pieces | Time found | Above the best possible | Distance from the curve | Sweeps |
|---|
A second opinion, from optics
Bernoulli's own trick: treat the marble as a ray of light in a medium that gets faster with depth, and bend it at each layer by the law of refraction. No optimiser, no descent integral, no curve assumed. The path falls out of one constant.
| Layers | Its own time | Its path, scored exactly | Distance from the curve |
|---|
A third opinion, from Newton
The same descents integrated forward in time from rest, with energy conservation as an output rather than an assumption.
| Track | Steps | Time in seconds | Difference | Energy drift |
|---|
When is a straight ramp good enough?
The penalty depends on one number: how far the finish is sideways compared with how far it is down. It does not depend on the size of the run, on gravity, or on what you roll.
| Sideways / down | Best time | Straight ramp | Penalty |
|---|
| Penalty | Sideways / down | Drop at least |
|---|
Does it matter that a marble rolls?
A rolling ball has to spin up as well as speed up, so it is slower. The question this page was built to answer is whether it is slower on a different curve.
| Body | I / mR² | Effective gravity | Slower by | Shift in the curve |
|---|
| Ball radius / drop | Machined groove | True best | Penalty |
|---|
Check it here, in this browser
The table above was produced offline. Press this and the same engine recomputes a sample of it in front of you, and says whether the two agree.
| Quantity | Shipped | Recomputed here | Agrees |
|---|---|---|---|
| Not run yet. | |||
What this is
A marble run is a toy: a track, a slope, a ball. It has no single author and belongs to nobody. This page is an independent, self-contained build of the question the toy poses — given two points, what track gets the marble down fastest? — written from scratch in plain JavaScript with no libraries, no network calls and no account.
What it is faithful to, and what is new
Where the numbers come from
| Tag | Statement | Source |
|---|
How to play
- Race — set the shape of the drop, press Release, and watch four marbles leave together.
- Your track — tick "Race my track too", then drag the pale handles. Get within a tenth of a percent of the best possible and the page says so.
- Equal time — six marbles, six heights, one track, released at once.
- Workshop — the tables, the two independent cross-checks, and the places each one breaks.
Keyboard: Space releases or resets, 1–4 switch sections.