Spherical Scatter data to Smooth Surface Plot

조회 수: 5 (최근 30일)
Aaron LaBomascus
Aaron LaBomascus 2016년 4월 12일
댓글: Walter Roberson 2016년 4월 12일
I am having an issue with rendering a surface that is not horrendous from my data. My data will have the rough shape of a variant of a toroid. I have looked into all the forum's for similar issues but it doesn't seem that spherical surfaces triagulate very well. I've tried trisurf(), mesh(), meshgrid(), and plot3, but it all has random spikes and lines all over the graph. Any thoughts on how to make it clean?
clear; clc;
% 's' subscript denotes "spherical talus"
xh = csvread('C:\Users\CAE User\Desktop\datah.csv',0,2,[0,2,3149,2]);
yh = csvread('C:\Users\CAE User\Desktop\datah.csv',0,3,[0,3,3149,3]);
zh = csvread('C:\Users\CAE User\Desktop\datah.csv',0,4,[0,4,3149,4]);
xs = csvread('C:\Users\CAE User\Desktop\datas.csv',0,2,[0,2,3149,2]);
ys = csvread('C:\Users\CAE User\Desktop\datas.csv',0,3,[0,3,3149,3]);
zs = csvread('C:\Users\CAE User\Desktop\datas.csv',0,4,[0,4,3149,4]);
Stri = delaunay(xs,ys);
plot(xs,ys,'.');
[r,c] = size(Stri);
disp(r)
h = trisurf(Stri, xs, ys, zs);
color 0.7
axis vis3d
l = light('Position',[-50 -15 29])
set(gca,'CameraPosition',[208 -50 300])
lighting phong
shading interp
colorbar EastOutside

답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 12일
With R2014b or later, the new boundary() or alphashape might help. For earlier versions there is an alphashape File Exchange contribution.
  댓글 수: 2
Aaron LaBomascus
Aaron LaBomascus 2016년 4월 12일
How can I download this function?
Walter Roberson
Walter Roberson 2016년 4월 12일
http://www.mathworks.com/matlabcentral/fileexchange/28851-alpha-shapes and click on Download Zip. Unzip it into a convenient directory that is not under your MATLAB installation directory. Use pathtool to add that directory to your MATLAB path; remember to tell pathtool to save the result. Now you should be able to call the function.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by