How to generate a surface from xyz coordinates of triangular mesh nodes
Show older comments
I have a matrix ox xyz coordinates (XYZ_Points) that represents only the surface nodes of a cuboid. I want to convert this coordinates back to a surface, but what I generated has many rough lines all over the cuboid, I do not want to hide the lines because I need to show the meshed surface, Please, how can I generate a clean image like the one in the second figure? Attempts to use mesh or surf with the coordinates did not work. A possibility to add a colour matrix to determine the color of each triangle will also be great.
figure(1)
x = XYZ_Points(1,:); %x coordinates
y = XYZ_Points(2,:); %y coordinates
z = XYZ_Points(3,:); %z coordinates
DT = delaunayTriangulation(x',y',z');
tetramesh(DT,EdgeColor = [0 0 0]);


Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
