Spherical Scatter data to Smooth Surface Plot

5 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

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

Accedi per commentare.

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by