...
running...
How to use
A four-wheel-drive off-road vehicle crosses the terrain at a target speed. Arrows show the weight at the centre of gravity (yellow dot), the normal forces under the front and rear wheels and the drive force. The orange line in the graph is how much of the available traction the vehicle is using: above 1 (red line) the wheels spin and the vehicle loses speed or slides back.
Try: pick the constant ramp and raise the angle until the wheels slip; change the surface from gravel to mud or ice; switch to rear-wheel drive and watch the front axle go light on slopes; raise the centre of gravity or move it back to approach the backward tipping angle shown in the readout.
The science
Axle loads on a slope. With the centre of gravity at distance a ahead of the rear axle... measured here from each axle (a from the front axle, b from the rear axle, height h, wheelbase L = a + b) and slope angle theta, moments about each contact point giveN_front = m g (b cos theta - h sin theta) / L, N_rear = m g (a cos theta + h sin theta) / LTheir sum is m g cos theta; climbing transfers weight to the rear axle.
Traction limit. Dry (Coulomb) friction caps each wheel force at mu N. With locked four-wheel drive the vehicle can use all of m g cos theta, so it climbs untilm g sin theta + c_rr m g cos theta = mu m g cos theta => tan theta_max = mu - c_rrTwo-wheel drive uses only the driven axle load, so its limit is lower and depends on the weight transfer above.
Power. The engine can deliver at most F = P/v, so at low speed the traction limit governs and at high speed the engine does. Climbing at constant speed needs P = (m g sin theta + c_rr m g cos theta + drag) v.
Tipping. The vehicle rolls backwards over the rear wheels when the front load reaches zero, tan theta = b/h, and sideways when tan theta = (track/2)/h.
Simplified: a 2D side view with a point-contact tyre model: one friction coefficient per surface, a constant rolling-resistance coefficient c_rr = 0.03, no suspension travel, no tyre deformation, no sinkage in sand or mud (only a lower mu), no differential or engine-torque curve. Slip is shown as a reduction of drive force to 90 percent of the static limit. The terrain is a smooth analytic profile, not scanned data.
What is checked and why you can trust it
Every time the page loads, and whenever you press Re-run check, the simulation evaluates its own mathematics against an independent reference, such as a closed-form formula, a finite-difference derivative or an exhaustive count. Each line above reports PASS or FAIL together with the measured numbers, so you can see by how much it agrees. Results are also published on window.__msChecks for automated testing. The check never uses the same code path as the animation it validates, otherwise it would only confirm itself.
How to read a failure: a FAIL line means the measured discrepancy exceeded the stated tolerance for the current slider values. Try Reset, then move the sliders back toward their defaults; if a check still fails at the defaults it is a bug worth reporting. Tolerances are chosen from the numerical method itself, never tuned to make a test pass: round-off level (1e-9) for exact algebra, about 1e-3 for finite differences and Monte Carlo estimates with a few hundred thousand samples, and a documented margin for stochastic learning runs.
Reproducibility: the particle and pen simulations use the browser random generator for initial positions, so exact pixels differ between visits, but the checks depend only on mathematics and not on those positions. Fixed wave tables (curl noise) and fixed grammars (L-system) are deterministic.
This is an educational model. It shows the mechanism clearly, but it is deliberately simplified; the science panel lists what was left out.