← Prashanth Shankar

Pitch Space Finder

A full-size 11-a-side pitch with two numbered teams. Drag any player and everything recomputes live: each team's largest internal gap (the biggest hole between its own players), a red→green congestion heatmap, and a panel of spatial-control metrics. Useful for asking concrete questions — is there a hole between our lines, should the 9 drop into it, are we too compact?

The maths. Each team's space is the largest empty circle that fits between its own players: candidate centres are that team's Voronoi vertices (points equidistant from three team-mates), kept inside the team's convex hull and hill-climbed to maximise the distance to the nearest team-mate — so the circle fills the biggest hole in the team's shape without crossing one of its own players. (The combined-space toggle instead finds the biggest circle clear of all 22.) Space as region swaps that single circle for the true shape of the open space: it contours the clearance field at an adaptive threshold, masked to a band around the team's convex hull, so an irregular pocket — say the wedge between two players and the touchline — is highlighted as a multi-sided polygon (with holes where players sit) rather than forced into a circle. Pitch control integrates the nearest-player Voronoi partition over a 1 m grid; surface area uses the Andrew monotone-chain convex hull and the shoelace formula; stretch index and compactness are first- and nearest-neighbour moments of the team's point cloud. It's a single static frame — v1 of a tool meant to grow into time-averaged "persistently open zones" later.