#voronoidiagram

2025-05-06

Yet another optimized Voronoi tiling. This was supposed to be a simpler alternative to the previous tiling approach, but I ended up going down a rabbit hole of various dithering algorithms.

Instead of the equal-sum partitions, this uses regular dithering to find the Voronoi seed points, and the tile areas are inversely proportional to the colour values. My simple random dithering didn't work as well as expected, so I started to look into alternatives. I was of course aware of Floyd-Steinberg, and as I grew a bit tired of this demo, I ended up cheating a little by using a ready-made library. Since I was using PIL for image handling anyway, I could simply use its format conversion functions to get a 1-bit image, which uses F-S by default.

As before, I planned to use edge detection to get smaller tiles at the contrast edges. However, it didn't work so well with dithering, as it would concentrate basically all seed points at the edges. So here I used a mix of edge detection and the original. I think it worked out nicely here, as the bright colours often coincide with areas of small detail, while the dark background doesn't need much resolution.

#voronoidiagram #pixelart #blockart #tiling #raster #mosaic #pythoncode #opengl #algorithmicart #algorist #mathart #laskutaide #ittaide #kuavataide #iterati

2025-05-02

I wanted to make the optimized tiling look more organic, and I've already played with Voronoi diagrams quite a lot. But this turned out a bit more messy than expected. To preserve the size and shape variations of the rectangles in the Voronoi cells, I ended up using a non-uniformly weighted metric. I guess it counts as a shape metric, using the definition in my Bridges 2020 paper.

As before, there's a roughly uniform tiling with an equal number of cells for comparison.

#voronoidiagram #pixelart #blockart #tiling #raster #mosaic #pythoncode #opengl #algorithmicart #algorist #mathart #laskutaide #ittaide #kuavataide #iterati

𝕠𝕓𝕛𝕖𝕥 𝕕𝕚𝕤𝕔𝕣𝕖𝕥objetdiscret@pocketpixels.club
2024-03-02

I made this #PixelArt #VoronoiDiagram in #Atari2600 colors because math really is beautiful. (I also added an extra layer to give it some three-dimensionality.) I feel like this #MastoArt could make an interesting album cover.

a pixel art Voronoi diagram (which looks like adjacent soap bubbles pressed against each other) in gradated rainbow colors against a black background

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst