Spherical Scatter data to Smooth Surface Plot

5 vues (au cours des 30 derniers jours)
Aaron LaBomascus
Aaron LaBomascus le 12 Avr 2016
Commenté : Walter Roberson le 12 Avr 2016
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

Réponses (1)

Walter Roberson
Walter Roberson le 12 Avr 2016
With R2014b or later, the new boundary() or alphashape might help. For earlier versions there is an alphashape File Exchange contribution.
  2 commentaires
Aaron LaBomascus
Aaron LaBomascus le 12 Avr 2016
How can I download this function?
Walter Roberson
Walter Roberson le 12 Avr 2016
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by