Creating AlphaShape from triangulation dataset
조회 수: 10 (최근 30일)
이전 댓글 표시
Is there any way to directly generate an 3D alpha shape from the triangulation dataset ( points and connectivity list matrices)? I don’t want to fit an alpha shape to the 3D points without using the connectivity list matrix as this leads to the loss of accuracy. The method I am looking for should incorporate both matrices (Points and ConnectivityList) to recreate the AlphaShape. I would appreciate any help you can provide.
댓글 수: 0
채택된 답변
John D'Errico
2023년 8월 20일
편집: John D'Errico
2023년 8월 20일
Is there any way? Trivially, yes. Ok, maybe trivial is in the eyes of the writer. I can say this because I have written both 2d and 3d alpha shape codes from scratch, and they both start from a triangulation/tessellation.
You just look at the surface facets of the triangulation. Then any tetrahedron that would allow the alpha ball to penetrate into the shape so that an alpha sphere of radius alpha would touch the interior vertex, that tetrahedron gets deleted. Now just test every surface facet. Whenever you delete a tetrahedron from the list, just update the list of surface facets.
There is some bookkeeping in this of course, and you will need to figure out the test to determine if an alpha ball can penetrate the shape through that facet. Without looking at any of my code, the test would seem to take two parts, first by looking at the radius of the in-circle that fits inside the triangular facet.
So, is there a way to do this? Yes, as I said, it is straightforward. You will need to write some code, since I won't provide the code I wrote myself (many years ago, before MATLAB even had a 2-d alpha shape. Geez, roughly 23 years ago, since I've been retired almost that long. Time flies.)
댓글 수: 4
John D'Errico
2023년 8월 20일
편집: John D'Errico
2023년 8월 20일
In my own case, I just wrote my own tools to test if a point was inside an alpha shape. My suite of tools was quite extensive, allowing things like a slice through a simplicial complex, mappings form one space to another, an adaptive numerical integration over a domain, surface modeling in multiple dimensions, adaptive surface modeling, intersections and unions of simplicial complexes, etc.
As far as the alphaShape tool, you cannot supply a triangulation as a basis for the alphaShape utility. Of that I am pretty sure.
X = alphaShape(rand(20,3))
struct(X)
So there are no hidden fields we can access to contain the simplicial dissection.
And that means we cannot create a tessellation, then stuff it into an object we can use inShape on. Sorry. At most you can create a feature request directly to tech support to allow that capability for the future.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Bounding Regions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!