Quesion applying cdata to patch

2 views (last 30 days)
Brian
Brian on 8 Sep 2014
Edited: Brian on 8 Sep 2014
Hello, thanks for reading this,
What I want to do is visualize a reconstructed surface mesh I have using the patch function. I have the x,y,z,r,g,b and connectivity information from meshLab, and I want to visualize the surface in Matlab.
I've been able to patch the geometry using solid colors, meaning I can see my meshes with patch. Additionally, I have my cdata saved as a Nx3 matrix, where N is the number of vertices.
My problem is this, again viewing the mesh as a solid surface is easy, but when I try to apply cdata on the edges using:
set(p,'FaceColor','interp',...
'FaceVertexCData',cdata,...
'EdgeColor','interp',...
'LineWidth',2)
I get the following error:
Warning: Color Data is not set for Interpolated shading
Any ideas?
EDIT: so let me give a little more information.
my xco, yco and zco matrices are 3xM each, where M is the number of faces. In my case, I have 23054 faces, and I have 21964 vertices. My cdata is therefore 21964x3, since each vertex has a RGB transfer function.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!