A strategic game of Loci and Voronoi Diagrams based on Euclidean Distance.
This simulation generates a Voronoi Diagram in real-time. The algorithm finds the closest base (\(d_1\)) and second closest base (\(d_2\)) for every pixel. To draw perfectly uniform borders, we calculate the exact perpendicular distance \(D\) from any pixel to the boundary line using the difference of squared distances: $$ D = \frac{d_2^2 - d_1^2}{2 \times \text{distance between bases}} $$ By using this exact geometric distance, the perpendicular bisectors maintain a perfectly sharp, uniform thickness everywhere on the canvas!