I am trying to create a network which will first generate some random points within a polygon and then connect those points using polylines. The polygon has few holes in it and I don't want my network to pass through those holes. The function "inpolygon" is able to identify whether or not a point is inside a polygon. So, none of my points are generated within those holes. However, the problem is with the lines which connect those points. The lines are passing through those holes. Is there a function like 'inpolygon' which will be able to identify whether a line is inside a polygon? I have attached a screenshot of my problem. Any kind of help will be highly appreciated. Thanks!
MATLAB: Is there a function to identify whether polylines are located inside a polygonal region
edge detectioninpolygonnetwork problemshaperead
Best Answer