Calculating depth at certain points of a trisurf plot

3 views (last 30 days)
I have made a plot of a reservoir layer in the subsurface using griddata and surf. Now I want to know how much the plot differs when I use the Delaunay equation instead of griddata. With griddata I have te values of the depth at the points of:
if true
x=35:1:48;
y=74:1:85;
[X,Y]=meshgrid(x,y);
end
I would like to know (I think by interpolation) what the depth of the surface is at every point of the meshgrid.
if true
clear
close all
clc
x=35:1:48;
y=74:1:85;
[X,Y]=meshgrid(x,y);
xzylRange = 'A1:N12';
filename = 'depthtopmainreservoir.xlsx';
sheet = 1;
xlRange = 'B19:B97';
ylRange = 'C19:C97';
zlRange = 'D19:D97';
XX = xlsread(filename,sheet,xlRange);
YY = xlsread(filename,sheet,ylRange);
Z = xlsread(filename,sheet,zlRange);
ZZ=Z./1000; %setting depth from [m] to [km] for scale
z=griddata(XX,YY,ZZ,X,Y,'cubic');
figure(1)
scatter3(XX,YY,ZZ,'fill')
figure(2)
surf(X,Y,z)
hold on
scatter3(XX,YY,ZZ,'fill')
xlabel('x in [km]')
ylabel('y in [km]')
zlabel('Depth in [km]')
colorbar
daspect([1 1 0.1]);
hold off
figure(3)
[c,h]=contour(X,Y,z);
xlabel('x in [km]')
ylabel('y in [km]')
title('Depth in [km]')
clabel(c,h)
colorbar
figure(4)
[c,h]=contour3(X,Y,z);
hold on
scatter3(XX,YY,ZZ,'fill')
daspect([1 1 0.1]);
xlabel('x in [km]')
ylabel('y in [km]')
title('Depth in [km]')
clabel(c,h)
colorbar
hold off
%%delaunay equation
figure(5)
plot(XX,YY,'.','markersize',12)
xlabel('Longitude'), ylabel('Latitude')
grid on
figure(6)
tri = delaunay(XX,YY);
hold on, triplot(tri,XX,YY), hold off
figure(7)
hidden on
trimesh(tri,XX,YY,ZZ)
xlabel('x'),ylabel('y'),zlabel('Depth in [km]');
hold on
scatter3(XX,YY,ZZ)
colorbar
hold off
daspect([1 1 0.1]);
figure(8)
triZ = delaunay(XX,YY);
hold on, trisurf(triZ,XX,YY,ZZ);, hold off
daspect([1 1 0.1]);
end

Answers (0)

Categories

Find more on Delaunay Triangulation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!