I have an alphaShape object (shp) made of 11 distinct sub-regions (N=11).
I want to partition my alphaShape between it's 11 respective sub-regions.
I want to plot each region in a different color and compute its respective area.
x and y are the coordinates of shp.
For n=1, I compute the x-y coordinates of the sub-region (x1 & y1) , make a new alphaShape (shp1) and compute its area (area1).
I redo these steps for n=2,3,...,N.
The file data.mat attached contains the variables shp, x and y.
Here what it looks like for n=1:
tf1 = inShape(shp,x,y,1);
shp1 = alphaShape(x1,y1,1);
It works but I feel like I am doing a lot of unnecassary steps.
I am looking for a clever way to use the sub-regions of an alphShape object as distinct alphaShape objects on their own.
Thanks