Space and shape, tall and dark
Soccer pitch Drawn as: a soccer pitch, 105 by 68 metres, with the halfway line, the centre circle, both penalty areas, goal areas, penalty marks and arcs, the corner arcs and the goals. Data: Space control of 22 players. Share of the surface nearest each team's players: away 50.7%, home 49.3%. Convex hull of 22 players. home: 11 players, area 29568 square feet, away: 11 players, area 31308 square feet. Space control of 22 players Share of the surface nearest each team's players: away 50.7%, home 49.3%. 1, home: 4.1% 2, home: 2.7% 3, home: 2.2% 4, home: 3.2% 5, home: 2.4% 6, home: 1.9% 7, home: 5.2% 8, home: 3.9% 9, home: 8.5% 10, home: 10.1% 11, home: 5.1% 1, away: 6% 2, away: 5.2% 3, away: 6.3% 4, away: 7.2% 5, away: 4.2% 6, away: 3.7% 7, away: 2.8% 8, away: 2.3% 9, away: 3.6% 10, away: 2.8% 11, away: 6.4% Convex hull of 22 players home: 11 players, area 29568 square feet, away: 11 players, area 31308 square feet. home: 11 players, area 29568 square feet away: 11 players, area 31308 square feet
The picture above was drawn when the docs were built. The script below draws it again with the published package.
import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";
const players = Array.from({ length: 22 }, (_, i) => ({ x: 8 + ((i * 37 + (i < 11 ? 3 : 17)) % 88), y: 8 + ((i * 53 + (i < 11 ? 5 : 11)) % 84), team: i < 11 ? "home" : "away", number: (i % 11) + 1 }));
const svg = drawKyogijo({
sport: "soccer",
orientation: "portrait",
theme: "dark",
layers: [{ kind: "voronoi", from: "opta", data: players }, { kind: "hull", from: "opta", data: players }],
});
This page imports the package from jsDelivr (major version 0), which serves only versions that have been published to npm. A feature added after the last release is not in it: the page then keeps the picture above and says why. The docs were built from version 0.6.1.