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 Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by