Dear all, please, I am looking to understand how the two functions ("inpolygon ()" and "boundary()") work ?
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all, Please, I have a question: I know the function "inpolygon()" give me a logical result if a data point inside or outside a polygon and "boundary()" give me the data points on the border of a shape. But how these two algorithms work ?
Please, I need to understand them.
Kind regards Ammar
댓글 수: 0
답변 (1개)
KSSV
2017년 1월 11일
From a given point P, the code draws a straight onto the given polygon. If this line intersects even number of times then the point lies outside the polygon, if the line intersects odd number points then points lies inside the polygon. The code is based on the refer article:
For outline refer:
댓글 수: 2
KSSV
2017년 1월 12일
It uses convexhull I guess....you can see the inbuilt function. Type edit boundary and read the code part and documentation given out there.
참고 항목
카테고리
Help Center 및 File Exchange에서 Elementary Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!