Sonars: a rose for each player

Soccer pitchDrawn 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: Direction roses of 400 movements: 5 roses of 10 directions. Most common direction: 0 degrees, 62. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top.Direction roses of 400 movements: 5 roses of 10 directionsMost common direction: 0 degrees, 62. 0 degrees points to the right end of the surface as drawn wide and 90 degrees to the top.1: 80 movements, most toward 0 degrees342 to 18 degrees: 4318 to 54 degrees: 18306 to 342 degrees: 192: 80 movements, most toward 0 degrees342 to 18 degrees: 5618 to 54 degrees: 13306 to 342 degrees: 113: 80 movements, most toward 0 degrees342 to 18 degrees: 6118 to 54 degrees: 10306 to 342 degrees: 94: 80 movements, most toward 0 degrees342 to 18 degrees: 6018 to 54 degrees: 11306 to 342 degrees: 95: 80 movements, most toward 0 degrees342 to 18 degrees: 6218 to 54 degrees: 9306 to 342 degrees: 9

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 moves = Array.from({ length: 400 }, (_, i) => { const x = 5 + ((i * 13) % 90); const y = 5 + ((i * 29) % 90); return { x, y, x2: x + 8 + (i % 5) + (x > 50 ? 4 : 0), y2: y + ((i % 7) - 3) * 2.2, id: (i % 5) + 1 }; });
const svg = drawKyogijo({ sport: "soccer", layers: [{ kind: "sonar", from: "opta", data: moves, by: "player", angles: 10 }] });

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.