Fill the faces of a mesh with the specified colors. fillMeshFaces(V, F, VERTEXCOLORS) Colorizes a mesh by filling faces with an array of values. The colors can be a NV-by-1 array of values, or a NV-by-3 array of values. Face filling uses 'interp' coloring mode. fillMeshFaces(V, F, FACECOLORS) Colorizes the mesh by specifying the value or the color associated to each face. Face filling uses 'flat' coloring mode. fillMeshFaces(..., PNAME, PVALUE) Specifies additional parameters that will be passed to the 'patch' function. Example % Colorize mesh based on z-coordinate of vertices. [v, f] = createIcosahedron; values = v(:,3); figure; axis equal; view(3); fillMeshFaces(v, f, values); % Colorize mesh using specific color for each face [v, f] = createIcosahedron; colors = jet(20); figure; axis equal; view(3); fillMeshFaces(v, f, colors); See also drawMesh
Package: matgeom