logo
By Lawrence

5 minutes

Pockets

The balls bank until the cloth stops them. There is nowhere for them to go.

A pocket is a circle, checked each step

A pocket is a capture zone: a circle on the bed that takes a ball once its centre is inside. When the table looks matters as much as where it looks. It checks after each step, the last of four jobs done in the same order every time:

each 1/120 s step:   move → collide → cushions → pockets

At 8 m/s a ball moves 6.67 cm a step, half a pocket's width. A look once a frame, every second or fourth step, can miss a ball that dips into the circle and back out.

The four corner circles have a radius of 6.5 cm, centred on the bed's corners. The two side circles are 6 cm, on the middle of each long rail. A pot is worth 1 point.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search