mandalas-colored
An R experiment about Voronoi tesselation to create colored mandalas
Colored mandalas from Voronoi tessellation in R
An R experiment that turns Voronoi tessellation into colored mandalas, with a Docker image, an RStudio route, and a headless mode that writes PNGs.
The experiment
mandalas-colored is an R experiment built on Voronoi tessellation. When you finish it you can create your own mandalas and color them with colourLovers palettes. The README also floats the idea of using it as a workshop, since it teaches Voronoi tessellation, recursivity, and ggplot in one package. The output is visual and satisfying, which makes it a decent teaching hook.
Running it in Docker
The container route is the easiest start. You can build a Docker image with the dependencies and package RStudio in for nice interactive viewing of the plots. The image is available on Docker Hub, so if you run the container and it is not found locally it gets pulled automatically. That removes the dependency setup entirely if you just want to see the mandalas.
Interactive session
With the container running, open a browser to the local address, log in with the rstudio username and password, and open the mandalas colored R file in the file browser. The mandalas appear in the plot area in the upper right. It is a low friction way to fiddle with the parameters and watch the shapes change.
Headless output
For scripted runs you can skip the interface. Bind a folder to the data directory in the container and the output writes there. The command line options control the generation: iterations for depth, radius for the number of points, a factor for expansion or compression, and an outfile path. Mapping your host directory to the data directory is how you get the PNGs back out.
Community notes