Lloyd's algorithm for Voronoi relaxation:
Each Voronoi cell has a barycenter – the centroid. Moving each cell's source point towards the cell's barycenter 'relaxes' the network. Repeat this step until all cells are balanced.
#creativecoding #javascript #voronoi #lloydsalgorithm