matlab - How to represent a polygon with hole(s)? -


It is usually popular for working with polygons, in whose order CW or CCW vectors (2 * 1 or 1 * 2 metric). However, how to make polygons holes in vectors?

I am going to introduce various processes on these polygons, so I want to represent those representatives with whom I can work easily or efficiently. (I.e., how would I explain such algorithms to such polygons in my program?)

Polygon is 2D and I am programming in the catalog.

Edit 1: I am going to calculate these polygons (with or without holes).

As mentioned by others, polygon with holes be presented as an external boundary More than zero interior borders, all of which are mutually irreversible *. If you use the nozzle to set the in / out, then be sure to specify your inner borders in the opposite direction as the outer bounds (the counter-clockwise for the external and the clockwise for the interior, or vice versa, vice versa), so that the contour The integrals are zero inside the hole.

FYI, type definition / representation has been formally formulated in OpenGIS Simple Features Specification ().

As far as representation:

I probably have a cell array of Nx2 matrix, where the first element in the cell array is the outer boundary, and the remaining elements in the cell array (if any ) There are internal limitations. I will use a cell array because the number of points on each border can not be the same number.

* Non-overlapping = Excluding at different points, e.g. One diameter in one class:

alt text


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -