0
Voronoi Diagrams

I need to code for Voronoi Diagrams. I am using Scilab for my application. MATLAB has functions for plotting Voronoi Diagrams whereas I find only part of it that is till Delaunay Triangle in Scilab. Please suggest how to proceed further from Delaunay Triangle to Voronoi Diagrams


Scilab 17-09-18, 11:45 a.m. ritu_2306
0

Hello Ritu,

After you get the Delaunay Triangles using the cglab toolbox in scilab, do the following.

  1. Find the perpendicular bisectors for each sides of the triangles and the circumcentre of the triangles.
  2. Join the perpendicular bisectors to the respective circumcentres

You might want to check for the following in the process

  1. If the circumcentre happens to lie outside the triangle, do not join the perpendicular bisector near to it. This can be done using a function which finds if a point lies inside a closed polygon. In our case the closed polygon will be a triangle formed by two perpendicular bisectors and one respective circumcentre. The third perpendicular bisector is the point we need to find if it lies inside the closed polygon. Although scilab does not have such function, octave has and the implementation can be easily adopted. See this link.
  2. If a neighbouring circumcentre lies on the line joining the perpendicular bisector and the respective circumcentre, join the two circumcentres instead of joining the perpendicular bisector and the respective circumcentre.

Hope this helps. Let us know if you could do it.

06-12-18, 11:28 a.m. rupakrokade


Log-in to answer to this question.