SciPy has tools for creating Voronoi tessellations. Besides the obvious data science applications, you can use them to make pretty art like this:
I started with Carlos Focil's mandalapy code, modifying the parameters until I had a design I liked. I decided to make the Voronoi diagram show both points and vertices, and I gave it an equal aspect ratio. Carlos' mandalapy code is a port of Antonio Sánchez Chinchón's inspiring work drawing mandalas with R, using the deldir library to plot Voronoi tesselations.
This is really cool, thank you for posting it!ReplyDelete
You can remove the comment about needing to change dashed to solid in _plotutils.py I believe, I can reproduce your image without doing that.
I'm one of the SciPy maintainers and would love to include your code and image into the SciPy docs or website somewhere. Would you be okay with that? The original R code is MIT-licensed, so it seems feasible (Carlos Focil would also need to agree of course).
Hi Ralf, that would be great!. Feel free to include the code. It is possible to include somewhere a link to the github repository?Delete
Thanks for asking!
I don't have a user in this website, and my comment appears as "Unknown", but I'm Carlos Focil. If you have further comments or questions you can contact me at email@example.comDelete
Ralf, thanks so much for your comment! Wow, that would be awesome! Yes, ask Carlos :)ReplyDelete
I removed the comment because the dashed lines match my plot indeed. I believe the original intention of Carlos' comment was to replicate Antonio's images that had solid lines. Thanks for bringing that up - your comment inspired me to dig deeper into understanding the internals of voronoi_plot_2d() and learning.
Awesome, thank you both Audrey and Carlos! I'll open a PR soon where I'll Cc and credit both of you.ReplyDelete