Surface area of 3-D alpha shape
A = surfaceArea( returns the total
surface area of 3-D alpha shape
shp, including the surface area
of any interior voids in the alpha shape.
Create a set of 3-D points.
[x1, y1, z1] = sphere(24); x1 = x1(:); y1 = y1(:); z1 = z1(:); x2 = x1+5; P = [x1 y1 z1; x2 y1 z1]; P = unique(P,'rows');
Create and plot an alpha shape using an alpha radius of 1.5.
shp = alphaShape(P,1.5); plot(shp)
Compute the surface area of the alpha shape.
totalsurfarea = surfaceArea(shp)
totalsurfarea = 24.9361
Compute the surface area of each region separately.
regionsurfareas = surfaceArea(shp, 1:numRegions(shp))
regionsurfareas = 1×2 12.4680 12.4680