GEOMETRIC PHYSICS

Reflective Polygon Billiards

Follow one ray reflecting inside a polygon and drawing a complex luminous collision trail.

↓ Jump to simulationFree · No loginAdjustable controls
INTERACTIVE PREVIEW · 9:16 FULL FRAMEREADY · CLICK START
Your browser requires Canvas.
00:00
THE CANVAS IS THE COMPLETE FRAME
EXPLORE THE IDEA

What are you watching?

A ray reflects from the sides of a regular polygon by reversing the component of its direction perpendicular to each wall. The path is computed from geometric line intersections.

TRY IT YOURSELF

Change one thing. Watch what happens.

  1. Start the simulation, then pause to inspect the pattern.
  2. Change one control at a time and compare the result with your prediction.
  3. Reset to repeat the demonstration. Use fullscreen for a closer view and the sound control to choose whether to listen.