Get AI summaries of any video or article — Sign up free
How colliding blocks act like a beam of light...to compute pi. thumbnail

How colliding blocks act like a beam of light...to compute pi.

3Blue1Brown·
6 min read

Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Represent the two-block state using a point in configuration space: x encodes d1 and y encodes d2, so collisions become boundary hits.

Briefing

Counting the clacks in the classic two-block collision puzzle reduces to a geometry problem that behaves like light bouncing between mirrors—and that mirror-bounce count turns into a clean “how many angles fit into π” calculation. The key move is to encode the blocks’ positions in a two-dimensional configuration space, where each collision corresponds to the moving point hitting one of two boundary lines. With the right coordinate rescaling, the point moves at constant speed and reflects off those boundaries with equal “angle of incidence” and “angle of reflection,” making the setup mathematically identical to optics.

In this approach, the horizontal coordinate represents the distance from the wall to the left edge of the big block (d1), while the vertical coordinate represents the distance from the wall to the right edge of the small block (d2). A collision between the blocks happens exactly when d1 = d2, which becomes the diagonal boundary in the (d1, d2) plane. The configuration space is also bounded by the condition that the small block hits the wall when d2 equals its width, producing a second boundary. As the system evolves, the point representing (d1, d2) traces a path bouncing between these boundaries.

The “mirror” analogy initially looks off because the collision line is not at a 45° angle once masses differ. The fix is a rescaling: replace x with √m1·d1 and y with √m2·d2. This stretches the configuration space so that the diagonal collision condition becomes a straight line whose slope is √m2/√m1, meaning the angle between the boundaries depends directly on the mass ratio. In these rescaled coordinates, energy conservation implies the moving point has constant speed: the squared speed becomes proportional to m1v1^2 + m2v2^2, i.e., the system’s kinetic energy (under the idealization of perfectly elastic collisions with no friction). Momentum conservation then takes a geometric form: it becomes a dot-product constraint that forces the direction of the point’s velocity to reflect so that the angle with the collision line is preserved. That is exactly the optics rule for specular reflection.

Once the dynamics are recast as mirror reflections, the counting problem becomes a standard optics trick. Instead of reflecting the beam, imagine the beam continues straight while the “world” flips across each mirror—an “illusion” that works only because incidence equals reflection. Under this viewpoint, the number of bounces equals the number of mirror-separated “world copies” the straight beam crosses. If the mirrors meet at angle θ, the beam advances by θ each time; the total number of distinct crossings before exceeding a half-turn is ⌊π/θ⌋. The mass ratio determines θ through the rescaled geometry, so the collision count inherits the same angular structure.

Finally, when the mass ratio is a power of 100, the angle θ aligns with the same mechanism used in the earlier solution, causing the digits of π to appear in the clack count. The broader takeaway is methodological: representing a changing mechanical system as a point moving in a carefully chosen space can turn hard dynamics into solvable geometry, with optics providing the right intuition for reflection and counting.

Cornell Notes

The collision-counting puzzle can be reframed as a light-and-mirrors problem by encoding the blocks’ positions as a point moving in a 2D configuration space. Let x = d1 and y = d2, where d1 and d2 are distances from the wall to the blocks’ edges; collisions correspond to the point hitting boundary lines (d1 = d2 for block-block contact, and d2 = small-block width for wall contact). To make the “mirror” analogy exact for arbitrary mass ratios, rescale coordinates to x = √m1·d1 and y = √m2·d2. In these coordinates, energy conservation gives constant speed, and momentum conservation forces equal incidence and reflection angles—so the point reflects like a ray of light. Counting collisions becomes counting how many mirror “copies” a straight ray would cross, yielding ⌊π/θ⌋, where θ is set by the mass ratio.

How does the configuration-space idea translate block positions into geometry?

Use a 2D plane where the x-coordinate is d1 (distance from the wall to the left edge of the big block) and the y-coordinate is d2 (distance from the wall to the right edge of the small block). The moving mechanical state becomes a moving point (d1, d2). A block-block collision occurs when d1 = d2, which is a boundary line in this plane. A wall collision occurs when d2 equals the small block’s width, which forms another boundary. The system’s evolution is then the point bouncing between these boundaries.

Why is coordinate rescaling by √m1 and √m2 necessary?

In the unscaled (d1, d2) plane, the line d1 = d2 is not at the right angle to make reflections match the physics for general mass ratios. Rescaling to x = √m1·d1 and y = √m2·d2 changes the geometry so the collision boundary becomes x/√m1 = y/√m2, i.e., a line with slope √m2/√m1. This ensures that the reflection rule derived from momentum conservation matches the optics-style “angle of incidence equals angle of reflection” for any m1, m2.

How do energy and momentum conservation become statements about the moving point?

Energy conservation implies the point’s speed in the rescaled configuration space stays constant. The x- and y-components of the point’s velocity are proportional to √m1·v1 and √m2·v2, so the squared speed is m1v1^2 + m2v2^2, which is proportional to kinetic energy and remains fixed for perfectly elastic collisions with no friction. Momentum conservation can be rewritten as a dot-product constraint involving the vector of √m1 and √m2 and the point’s rate-of-change vector. Because the point’s speed magnitude is constant, keeping the dot product fixed forces the angle with the collision line to be preserved—exactly the reflection law.

What is the “illusion” trick for counting bounces, and why does it work?

Instead of reflecting the ray at each mirror, let the ray go straight while the “world” is flipped across the mirror. This works only when incidence equals reflection, which the rescaled dynamics guarantee. Under this trick, each bounce corresponds to entering a new reflected copy of the world, so counting bounces becomes counting how many angular steps of size θ fit before the straight ray has effectively rotated more than a half-turn.

Where does the formula ⌊π/θ⌋ come from?

If the mirrors meet at angle θ, each bounce corresponds to advancing the ray by an angle θ in the unfolded/illusion picture. The ray can cross distinct reflected copies until the accumulated angle exceeds π radians (half a circle). Therefore the number of crossings—and thus collisions—is the integer part of π/θ, written as ⌊π/θ⌋.

Review Questions

  1. In the rescaled configuration space, what geometric condition on the moving point corresponds to a block-block collision?
  2. How do conservation laws translate into (1) constant speed and (2) equal incidence/reflection angles for the configuration-space trajectory?
  3. Why does the bounce-counting problem become an angular “how many times does θ fit into π?” calculation?

Key Points

  1. 1

    Represent the two-block state using a point in configuration space: x encodes d1 and y encodes d2, so collisions become boundary hits.

  2. 2

    Rescale coordinates to x = √m1·d1 and y = √m2·d2 so that momentum conservation produces an optics-style reflection law for any mass ratio.

  3. 3

    In the rescaled space, energy conservation implies the configuration-space point moves with constant speed because its squared speed is proportional to m1v1^2 + m2v2^2.

  4. 4

    Momentum conservation can be rewritten as a dot-product constraint that forces the angle between the point’s direction and the collision line to remain unchanged, yielding equal incidence and reflection angles.

  5. 5

    Once reflections are exact, counting collisions becomes counting how many mirror-separated “world copies” a straight ray crosses using the incidence=reflection illusion trick.

  6. 6

    The collision count becomes ⌊π/θ⌋, where θ is determined by the angle between the two boundary lines set by the mass ratio.

  7. 7

    When the mass ratio is a power of 100, the resulting θ aligns with the same mechanism that makes π digits appear in the clack count.

Highlights

Encoding positions as (d1, d2) turns mechanical collisions into a point bouncing between two lines in a plane.
The √m1 and √m2 coordinate rescaling is what makes momentum conservation look like equal incidence and reflection angles.
Counting clacks becomes counting how many times an angle θ fits into π radians, giving ⌊π/θ⌋.
The “straight ray with a flipped world” illusion converts repeated reflections into a single continuous crossing problem.

Topics

Mentioned