# Balancing Act: Torque and Levers

> A lever balances when m₁r₁ = m₂r₂. Torque is force times lever arm, and net torque over moment of inertia gives angular acceleration.

- Category: Physics › Mechanics
- Level: core
- Tags: torque, levers, statics, rotation, moment-of-inertia
- Updated: 2026-11-01
- URL: https://gdcs.coody.app/physics/mechanics/balancing-torque

## What it is

**Torque** is the turning effect of a force: its size times its perpendicular distance from the pivot, `τ = r·F·sin φ`. A 2 kg box 3 m from a fulcrum turns a plank exactly as hard as a 3 kg box 2 m away on the other side, so the plank stays level. That is the law of the lever, `m₁r₁ = m₂r₂`.

When the torques do not cancel, the plank gains angular velocity in the direction of the stronger side: `Στ = I·α`. The **moment of inertia** `I = Σ m r²` grows with the square of distance, so the same loads placed far out make the plank turn more sluggishly even when the net torque is the same.

Games meet torque in see-saw puzzles, physics-based cranes, ragdolls and vehicles. In a rigid-body engine you rarely compute it yourself: call `applyForceAtPoint` and the engine adds `r × F` to the body's torque. Understanding it tells you why a heavy object placed off-centre tips a platform, why long arms feel slow to swing, and how far to put a counterweight.

## Key formulas

- **Torque (vector form):** $\vec\tau = \vec r \times \vec F$
- **Lever balance:** $m_1 g\, r_1 = m_2 g\, r_2 \;\Rightarrow\; m_1 r_1 = m_2 r_2$
- **Rotational Newton's law:** $\sum \tau = I\alpha$
- **Moment of inertia (plank + point loads):** $I = \tfrac{1}{12} M L^2 + \sum m_i r_i^2$

## Rules of thumb

- Static equilibrium needs both ΣF = 0 and Στ = 0 about any point; pick the pivot as that point so the support force drops out.
- Only the component of the force perpendicular to the arm counts: a weight on a plank tilted by θ has lever arm `r·cos θ`.
- Doubling a load's distance doubles its torque but quadruples its contribution to inertia.
- To balance a load W at distance r with a counterweight C, place C at `W·r / C` on the other side.

## Implementation

Net torque and angular step for a see-saw (fixed timestep):

```ts
type Load = { mass: number; x: number } // x: signed distance from pivot (m)

export function stepSeesaw(
  s: { angle: number; omega: number },
  loads: Load[],
  plankMass: number,
  plankLength: number,
  dt: number,
  g = 9.81,
  damping = 1.5
) {
  let torque = 0
  let inertia = (plankMass * plankLength ** 2) / 12
  for (const l of loads) {
    torque -= l.mass * g * l.x * Math.cos(s.angle) // CCW positive; right side pushes CW
    inertia += l.mass * l.x * l.x
  }
  s.omega += (torque / inertia - damping * s.omega) * dt
  s.angle += s.omega * dt
  s.angle = Math.max(-0.45, Math.min(0.45, s.angle)) // ground stops
}
```

## Common mistakes

- Comparing masses instead of torques: a light load far out can beat a heavy one close in.
- Using the distance along the tilted plank without the `cos θ` factor once it rotates.
- Forgetting the plank's own inertia, which makes an empty see-saw spin unrealistically fast.
- Applying a force at the centre of mass in the engine and wondering why the object never rotates; use the force-at-point call.

## Interactive visual

The cyan (left) and orange (right) loads sit on a grey plank with 1 m ticks; yellow arrows are their weights. The defaults balance (3 kg × 2 m = 2 kg × 3 m), so the plank stays level. Change any mass or distance and it tips toward the larger torque.

## Prompt

```text
Write a TypeScript see-saw puzzle module for a Three.js game. Inputs: plank length and mass, a list of loads {mass, x} where x is signed distance from the fulcrum, and a fixed timestep. Compute net torque Σ(−m·g·x·cos θ), moment of inertia ML²/12 + Σ m x², integrate angle with semi-implicit Euler plus light damping, and clamp at ±25° ground stops. Expose isBalanced(tolerance) and counterweightPosition(mass). Unit tests: 3 kg at −2 m and 2 kg at +3 m is balanced; moving the 2 kg load to +3.5 m makes the plank rotate clockwise.
```

## Related

- [Buoyancy](https://gdcs.coody.app/physics/mechanics/buoyancy.md) — Archimedes: a body is pushed up by the weight of fluid it displaces, so it floats with ρ_object/ρ_fluid of its volume under. Boats and crates in games.
- [Spring-Mass Oscillator](https://gdcs.coody.app/physics/mechanics/spring-mass-oscillator.md) — Hooke's law, damping and a periodic push: the forced oscillator behind springy cameras, wobbly UI and suspension, and why driving at ω₀ explodes.
- [Fixed Timestep](https://gdcs.coody.app/systems/simulation/fixed-timestep.md) — Run physics in constant dt slices from an accumulator, clamp long frames, and interpolate between the last two states for smooth, repeatable motion.

## Further reading

- [OpenStax University Physics — Torque](https://openstax.org/books/university-physics-volume-1/pages/10-6-torque)
- [OpenStax University Physics — Conditions for Static Equilibrium](https://openstax.org/books/university-physics-volume-1/pages/12-1-conditions-for-static-equilibrium)

---
Source: Game Development Cheat Sheet (https://gdcs.coody.app)
