Calculating depth at certain points of a trisurf plot

3 ビュー (過去 30 日間)
Lodewijk Pleij
Lodewijk Pleij 2018 年 4 月 24 日
編集済み: Lodewijk Pleij 2018 年 4 月 24 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDelaunay Triangulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by