How can I make voronoi treemaps? [closed]

2020-05-24 16:44发布

I want to make voronoi treemaps for statistics data, like alt text newsgraphy

Do you know how I can do that in Perl, PHP, Ruby, or Python?

7条回答
成全新的幸福
2楼-- · 2020-05-24 17:31

First of all, the lines are not strange: it's the result of the fact that this is not a normal Voronoi tessellation, but an area-weighted Voronoi (AWT) tessellation, possibly even a centroidal Voronoi tessellation (CVT). That being said, in order to have Voronoi regions (polygons) with significantly differing areas (which would reflect some attribute of the data), you need AWTs (preferably implemented as CVTs to retain nice aspect ratios for the polygons); a normal Voronoi algorithm (as suggested by some people above) will not be able to help you. There is probably no direct solution for this available, especially not for scripted languages, since the computational complexity due to iterative updating steps for AWTs is quite high. You should look up the work on "Voronoi Treemaps" and "Dynamic Voronoi Treemaps" by Balzer et al. and Sud et al. to get an idea of the algorithm and then implement it on your own (everything that you need is in their papers).

查看更多
登录 后发表回答