How do I create an offset buffer around an alphaShape?

조회 수: 6 (최근 30일)
Eric Hoffmann
Eric Hoffmann 2022년 4월 28일
편집: Matt J 2024년 1월 10일
Hi,
Currently I have a 2D alphashape that I wish to scale very slightly larger. Instead of scale one could also describe what I want by offsetting the perimeter or creating a buffer. In fact polybuffer does exactly what I want, however only accepts polyshape arguments. I was just curious if anyone had a method for this for alphaShape arguments. For now I will just create a triangulation of the alphaShape and then convert it to a polyshape so I can use polybuffer and either keep it there or resample to an alphashape. Also, for learning purposes if anyone can offer an explanation to why alphaShape has so many functions but not a buffer function like polyshape I truly am interested.
Thanks anyone and everyone!

답변 (2개)

Yash
Yash 2024년 1월 10일
Hey Eric,
You can try converting the alphaShape to a polygon using the 'alphaTriangulation' function and then use the 'polybuffer' function to create a buffer around the polygon. After that, you can convert the buffered polygon back to an alphaShape if needed.
To know more about the 'alphaTriangulation' and 'polybuffer' functions, refer to the documentations below:
Hope this helps!

Matt J
Matt J 2024년 1월 10일
편집: Matt J 2024년 1월 10일
Also, for learning purposes if anyone can offer an explanation to why alphaShape has so many functions but not a buffer function like polyshape I truly am interested.
Probably because if you dilate an alphashape with polybuffer-type function, it is not clear that the resulting shape is still in the family of alphashapes, or if it is, what the new alpha-radius and point-set would be.

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by