1

I'm facing issues when trying to create voronoi regions in MATLAB and handle infinite vertices. I am relatively inexperienced in programming which I feel is hampering my ability to solve this problem.

I want to trace specific locations near the central nodes of the voronoi sub-polygons using the function inpolygon. I can not utilise the function if one of the vertices is Infinite (INF). Therefore, I wanted to create a grid around the voronoi split (As seen in image), and only consider the region within this grid, thereby neglecting the infinite vertices.

What I have done so far:

I already have a certain 100 pairs of Latitudes and Longitudes of nodes, around which I create a voronoi split using voronoi(x_coordinates, y_coordinates) function.

When I have to determine the various coordinates of the sub-polygons within this split, I use the [V,C] = voronoin([x_coordinates, y_coordinates]);

Till now, this gives me all the of voronoi regions in V and all indexes of vertices for all sub-polygons (voronoi regions) in C.

Then I have implemented a function which uses inpolygon and takes x and y coordinates of the point that has to be traced within one of the voronoi regions. And here is where I am stuck. I am trying to implement a grid all around, but can not find the new intersecting vertices of the grid and the voronoi sub-region to find the new vertices of the voronoi sub-polygons.

Also, if there is any other way to achieve the same task, any help would be highly appreciated.

Many Thanks.

Teymour
  • 1,832
  • 1
  • 13
  • 34
  • I initially had simply negelected taking the inf vertice for the ```inpolygon``` usage, and the data that I am presently working on, works okay. But if for eg. I decide to split the entire region is less number of zones (4 voronoi splits), I can not simply just neglect the **inf** vertice. – Kshitij Rampotra Jan 15 '20 at 15:39
  • This seems to be the same issue as addressed in https://stackoverflow.com/questions/57471445/how-to-find-internsection-points-of-overhanging-lines-of-voronoi-diagram-interse – Alex Apr 18 '20 at 19:04

0 Answers0