Lesson goal: Billiards: Elastic Collisions & 90° Rule

Previous: Pole Position: Speed, Curves & Steering | Home | Next: Missile Command: Intercept Kinematics & Blast Geometry

Cue sports and billiards have fascinated mathematicians and physicists for centuries. In 1835, French physicist Gaspard-Gustave de Coriolis (famous for the Coriolis force) published his groundbreaking book Mathematical Theory of the Game of Billiards, analyzing the exact 2D vector kinematics, friction, and elastic collisions of spheres on a table!

Behind every bank shot, cut shot, and combination are fundamental laws of Newtonian mechanics and vector geometry.

The Table Geometry ($600 \times 340$)

The regulation table is a 2D Cartesian plane:
  • Cushion Boundaries: Left cushion at $x = 44$, Right cushion at $x = 556$, Top cushion at $y = 44$, and Bottom cushion at $y = 296$.
  • 6 Pockets: Four corner pockets at $(44, 44)$, $(556, 44)$, $(44, 296)$, $(556, 296)$ and two side pockets at $(300, 40)$ and $(300, 300)$.
  • Ball Radius ($R$): All balls have radius $R = 9\text{ px}$ (diameter $18\text{ px}$) and equal mass $m$.


The 90-Degree Tangent Line Theorem

When the moving cue ball strikes a stationary object ball elastically, linear momentum is conserved along the Line of Centers ($\hat{n}$) connecting both sphere centers:
  • The object ball always shoots away directly along the Line of Centers $\hat{n}$.
  • The cue ball retains its velocity component along the perpendicular Tangent Line $\hat{t}$.
  • Because $\hat{n} \cdot \hat{t} = 0$, the departure angles of the two balls form an exact $90^\circ$ right angle!


The Ghost Ball Method

To sink an object ball at $\vec{P}_{\text{target}}$ into a pocket at $\vec{P}_{\text{pocket}}$:
  1. Compute the unit vector pointing to the pocket: $\hat{u} = \frac{\vec{P}_{\text{pocket}} - \vec{P}_{\text{target}}}{\|\vec{P}_{\text{pocket}} - \vec{P}_{\text{target}}\|}$.
  2. At impact, the cue ball must be centered at the Ghost Ball position, exactly $2R$ behind the target along $\hat{u}$: $$\vec{P}_{\text{ghost}} = \vec{P}_{\text{target}} - 2R \cdot \hat{u}$$
  3. Aim the cue ball directly toward $\vec{P}_{\text{ghost}}$!


Controlling the Cue Stick with Code

You can pilot shots with deterministic Lua commands:
  • billiards_game(n): Initializes deterministic Challenge #$n$ (1: Cut & Ghost Ball, 2: Mirror Bank, 3: Combination, 4: Rail Kick).
  • aim(degrees): Aims the cue stick in degrees ($0^\circ$ is right, negative is up, positive is down).
  • aim_at(x, y): Aims directly toward table coordinate $(x, y)$.
  • aim_ghost(target_id, pocket_id): Automatically calculates and sets the exact angle for the Ghost Ball!
  • strike(power): Strikes the cue ball with power ($10$ to $100\%$).
  • english(side, draw): Applies side spin and backspin/topspin ($-1$ to $+1$).
  • wait(seconds): Simulates the physics until the balls finish rolling.
billiards_game(1)
aim(-16.4)

strike(65)

wait(3.0)
Move the mouse over a dotted box for more information.

  • Visual Guides: The dashed cyan circle shows the exact Ghost Ball contact point, the green arrow shows the Object Ball path into the pocket, and the yellow arrow marks the 90° Tangent Deflection Line!
  • Live Telemetry HUD: The header displays the Cue Aim Angle, Cut Angle $\phi$, Strike Power, and Sunk Balls.
  • Interactive Mouse Play: You can also aim by moving the mouse, and drag back on the cue stick to charge and strike manually!

Now you try. Can you pocket the 8-ball using the Ghost Ball aim angle, or try billiards_game(2) for a cushion bank?

Type your code here:


See your results here: