billiards
Unsophisticated billiards spinning ball physics.
Demo
In browser WebGL demo. Inspect physics using diagrams
Reference
Papers on ball mechanics, cushions and max spin simulation 1 2 3
3D graphics uses three.js
Inline LaTeX editor
Key equations
surface velocity
sliding motion
rolling motion
where
cushion bounce
Setup
nvm use v14.15.1
yarn install
yarn dev
Test
yarn test
yarn coverage
yarn serve
Maintain
yarn deps
yarn upgrade -L
yarn prettify
Two player
yarn websocket
yarn serve
add query parameter to url ?websocketserver=wss://host
Features
Backspin and sidespin well modeled. Presentation in 2d or 3d in any modern browser. Record and playback breaks. Two player mode with node websocket server.
Controls
Use mouse or keyboard:
⇦ ⇨ Aim
Control ⇦ ⇨ Fine aim
⇧ ⇩ Topspin and backspin
Shift ⇦ ⇨ Side spin
Space Hit - hold for more power
Progress snapshots
July 2018
July 2019
March 2021