PHP Classes

Work with your Code

Recommend this page to a friend!

      PHP Voronoi Diagram  >  All threads  >  Work with your Code  >  (Un) Subscribe thread alerts  
Subject:Work with your Code
Summary:Thanks for your Code
Author:Andy Licht
Date:2014-10-25 15:34:21

  1. Work with your Code   Reply   Report abuse  
Picture of Andy Licht Andy Licht - 2014-10-25 15:34:22
thanks a lot for your great work. Are you still working on it? I want to modify it, i wan t to get the polygon of each point. And the next step ist to add a point and only change the relevant poylgons - to speed up the performance.
Maybe you are interesstet in my solutions.
thanks a lot

  2. Re: Work with your Code   Reply   Report abuse  
Picture of Chi H. Chi H. - 2014-10-28 11:46:57 - In reply to message 1 from Andy Licht
Hi, thank you. You can get each polygon when you think of that an edge divide the 2 sites. Then you only need to get the distance from the sites to the midpoint of the edge and sort it by distance. For inner cells its the top 2 edges that divide 2 sites and for outer cell its only the top edges. Then maintain a list with all edges. If you want a faster algorithm you can try my hilbert curve. Sort the points with the hilbert index first and then run the triangulation. A simpler version is when you translate the coordinate to a binary and concatenate it. You can find a source code here:
My weighted voronoi is using some of the math from here: