MATLAB Function Reference Previous page   Next Page

Calculates isosurface and patch colors



nc = isocolors(X,Y,Z,C,vertices) computes the colors of isosurface (patch object) vertices (vertices) using color values C. Arrays X, Y, Z define the coordinates for the color data in C and must be monotonic vectors or 3-D plaid arrays (as if produced by meshgrid). The colors are returned in nc. C must be 3-D (index colors).

nc = isocolors(X,Y,Z,R,G,B,vertices) uses R, G, B as the red, green, and blue color arrays (true color).

nc = isocolors(C,vertices), and nc = isocolors(R,G,B,vertices) assume X, Y, and Z are determined by the expression

where [m n p] = size(C).

nc = isocolors(...,PatchHandle) uses the vertices from the patch identified by PatchHandle.

isocolors(...,PatchHandle) sets the FaceVertexCData property of the patch specified by PatchHandle to the computed colors.


Indexed Color Data

This example displays an isosurface and colors it with random data using indexed color. (See Interpolating in Indexed Color vs. Truecolor for information on how patch objects interpret color data.)

True Color Data

This example displays an isosurface and colors it with true color (RGB) data.

Modified True Color Data

This example uses isocolors to calculate the true color data using the isosurface's (patch object's) vertices, but then returns the color data in a variable (c) in order to modify the values. It then explicitly sets the isosurface's FaceVertexCData to the new data (1-c).

See Also

isosurface, isocaps, smooth3, subvolume, reducevolume, reducepatch, isonormals

Volume Visualization for related functions

Previous page  isocaps isonormals Next page

© 1994-2005 The MathWorks, Inc.