Home > other >  Compute area of 3D surface given coordinates of points
Compute area of 3D surface given coordinates of points

Time:12-30

Given the coordinates of each point, how to calculate the area of a three-dimensional surface in MATLAB?

x=-5:1:5;y=-5:1:5;
[xx,yy]=meshgrid(x,y);zz=Z;
figure(1)
mesh(xx,yy,zz) 
figure(2)
xb=-5:0.25:5;
yb=-5:0.25:5;
[xxb,yyb]=meshgrid(xb,yb);
zzb=interp2(xx,yy,zz,xxb,yyb,'cubic');
mesh(xxb,yyb,zzb)

above is my code.

enter image description here

the picture is the data of z.

I tried to search for questions alike but I just couldn't find it.

CodePudding user response:

Try converting it to an AlphaShape then use SurfaceArea.

  • Related