Quesion applying cdata to patch
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!