How it works
A Voronoi cell is every point on the sheet closer to one site than to any other. That definition is also a construction: the set of points closer to A than to B is one side of the perpendicular bisector between them, so a cell is the whole sheet clipped by one half-plane per other site. Clip against all of them and what is left is the cell, exact and convex — which is what a vector export wants. It is quadratic rather than the O(n log n) a Fortune sweep would give, and the one optimisation that matters is the skip: a site further away than twice the cell’s current radius cannot reach it.
Lloyd’s algorithm is then two lines. Move every site to the area-weighted centroid of its own cell, and rebuild the diagram. Repeat, and the cells converge on a centroidal Voronoi tessellation — the blue-noise honeycomb behind stippling, mosaic work and dot screens, where every cell is roughly the same size and roughly hexagonal. Watching it happen is the point of the piece: at zero steps the sites are wherever they were scattered and the sizes are wildly uneven; by six or eight the clumping the scatter left behind has gone.
The dual comes free. Every site that actually cut the cell during the clipping is a neighbour, and joining those pairs is the Delaunay triangulation — the same information read the other way round. Setting a Lloyd step to less than full strength moves each site part of the way to its centroid instead, which is a slower and gentler road to the same place.