how to create a volume using x,y,z co-ordinates for use in isosurface & isocaps function

4 views (last 30 days)
Hi I have x,y,z co-ordinates - which you can visualise with " figure, stem3(xI, yI, zI, 'MarkerFaceColor', 'g'); " , if you open my attached .mat file
I want to create a volume from this, compatible with the the matlab functions isosurface and isocaps
the eventual aim is to build a wavefront object (using this function https://uk.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-toolbox
How would I go about making (interpolating?) this volume matrix, assuming that the volume starts from z=0 to z=n ?
  3 Comments
Image Analyst
Image Analyst on 26 Sep 2018
I agree with KSSV. You don't even want a 3-D volume - it would be inefficient. If you want a solid surface with data at every point, you can interpolate with scatteredInterpolant().
cgenes
cgenes on 26 Sep 2018
Hi guys - thanks - two things i) I had a look at: F = scatteredInterpolant(x,y,z,v) creates a 3-D interpolant of the form v = F(x,y,z). But i don't think the example explains how to get v very well - could you explain with reference to my data? ii) if I succeed in getting a surface using scatteredInterpolant() could I still easily make a wavefront object file?

Sign in to comment.

Accepted Answer

KSSV
KSSV on 26 Sep 2018
Already you have a surface there......
surf(xI, yI, zI)
shading interp
colorbar
  1 Comment
cgenes
cgenes on 26 Sep 2018
yes thank you - i was missing the "shading interp" command
I shall accept this answer - but if you can think of any good ways to export this surface as a wavefront object file -would be most appreciated

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!