Storni su Roma: a flock of starlings over Rome at sunset, and you are the falcon

A web page where thousands of starlings fly over the rooftops of Rome at sunset, with St Peter's dome in the background. Each bird follows its seven nearest neighbours, as in the real flocks filmed above Termini station, and you are the peregrine falcon: with the mouse or a finger the flock splits open and the alarm sweeps through it like a wave.

**Storni su Roma** (Italian for "starlings over Rome") is a personal project of mine: a flock of starlings over Rome, seen from the Pincio towards St Peter's at the hour when, in winter, the flocks come back to roost in the city. There is a real discovery behind it. Between 2005 and 2008 the physicists of the StarFlag project filmed the flocks in 3D from the roof of Palazzo Massimo, opposite Termini station, and found that each starling adjusts its flight to its 6 or 7 nearest companions, however far away they are (Ballerini et al., PNAS 2008). The simulation works the same way.

**What it does**

- **The flock**: from 300 to 6,000 starlings in three dimensions, each with its own topological neighbours. Alignment, cohesion and separation are computed on them alone, and a point drifting slowly above the city calls them back. - **The peregrine falcon**: it follows the mouse, or your finger on a phone, or hunts on its own with a dive roughly every eight seconds. The starlings that see it veer away and pass the alarm on to their neighbours, who pass it on weaker: it shows as a dark wave crossing the flock. - **Neighbours followed**: from 1 to 12. With just one the flock frays into chains; with twelve it becomes a single body. - **The time of day**: from 4:38 to 5:38 pm, around sunset in early November. The sun sinks behind St Peter's dome, windows light up in the buildings, then the street lamps and the first stars. - **Sky only**: a button hides the title and the panels, and a link can carry the time, the starlings and the neighbours, like /?ora=-18&vicini=3.

**The hard part**

Finding the seven neighbours of thousands of birds on every frame would take millions of comparisons. The starlings sit in a grid of cells, re-sorted on every step, and each one looks only at the 27 cells around its own; the neighbours are recomputed every other frame. That keeps a step with 2,800 starlings at about 6 milliseconds. The city is not an image: St Peter's dome with the statues on its cornice, the bell towers and the umbrella pines are drawn by code on canvas.

Plain JavaScript without libraries, in a single page of 10 KB compressed; a small Node server with no dependencies serves it with a Content Security Policy that allows only its own script, in a read-only container on my server.

Concept, development and deployment · 2026

JavaScript, Canvas API, Node.js, Docker, CSS

View the site

Andrea Coppetta