Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Gyroscope precession in JavaScript: why a faster spin makes a top turn slower

Tip a stationary top and it falls straight over, following gravity's torque exactly where you'd expect. Spin the same top fast and tip it, and instead of falling it swings slowly sideways around the pivot. The torque nev

Tip a stationary top and it falls straight over, following gravity's torque exactly where you'd expect. Spin the same top fast and tip it, and instead of falling it swings slowly sideways around the pivot. The torque never stopped pointing down - what changed is that there's now angular momentum for it to redirect.

The precession formula

Gravity's torque is tau = mgr (weight times distance from pivot to centre of mass). Instead of tipping the spin axis over, that torque rotates the angular momentum vector L = I*omega sideways, at a rate:

Omega = mgr / (I*omega)

Faster spin means more angular momentum to redirect, so the same torque produces slower precession - the opposite of what intuition expects from "more torque, more effect."

Checked in JavaScript

const m = 0.2, R = 0.05, g = 9.8;      // 200 g disc flywheel, 5 cm radius
const I = 0.5 * m * R * R;              // disc moment of inertia about spin axis
const omega = 200;                      // spin rate, rad/s
const r = 0.1;                          // pivot to centre-of-mass distance

const Omega = (m * g * r) / (I * omega);
const rpm = Omega * 60 / (2 * Math.PI);

console.log(I.toExponential(2), Omega.toFixed(3), rpm.toFixed(2));
// I = 2.50e-4 kg*m^2   Omega = 3.920 rad/s   precession rate = 37.43 rpm
Quantity Value
Flywheel moment of inertia, I 2.5e-4 kg*m^2
Spin rate, omega 200 rad/s (about 1910 rpm)
Precession rate, Omega 3.92 rad/s (about 37.4 rpm)

The disc spins at nearly 2000 rpm, but the whole assembly sweeps around the pivot at only about 37 rpm - roughly 1/51st as fast. Double omega in the code above and Omega is cut exactly in half; that inverse relationship is the signature of gyroscopic precession and it's why bicycle wheels, tops and planets all precess slowly compared to how fast they actually spin.

Torque only changes angular momentum in the direction the torque points - it doesn't have to change the magnitude or tilt of L if there's a perpendicular direction to act in instead. With fast spin, L is large and nearly horizontal for a tipped top, so the same downward torque rotates it sideways around the pivot rather than tipping it further down.

I build PractiSci (https://www.practisci.in), a free virtual physics lab, and the Rotational Motion chapter includes an interactive gyroscope: gyroscope precession lab, or see the full rotational motion topic guide.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.