Isocaps, like isosurfaces, are created as
patch graphics objects. Use the
isocaps command to generate the data to pass to
patch. For example,
creates isocaps for the scalar volume data
voldata at the value
isoval. You should create the isosurface using the same volume data and isovalue to ensure that the edges of the isocaps fit the isosurface.
Setting the patch
FaceColor property to
interp results in a coloring that maps the data values spanned by the isocap to colormap entries. You can also set other patch properties to control the effects of lighting and coloring on the isocaps.
Example -- Adding Isocaps to an Isosurface
This example illustrates how to set coloring and lighting characteristics when working with isocaps. There are five basic steps:
1. Prepare the Data
This example uses a 3-D array of random (
rand) data to define the volume data. The data is then smoothed (
2. Create the Isosurface and Set Properties
patch to create the isosurface and set coloring and lighting properties. Reduce the
DiffuseStrength of the reflected light to compensate for the brightness of the two light sources used to provide more uniform lighting.
Recalculate the vertex normals of the isosurface to produce smoother lighting (
3. Create the Isocaps and Set Properties
isocaps using the same data and isovalue as the isosurface. Specify interpolated coloring and select a colormap that provides better contrasting colors with the blue isosurface than those in the default colormap (
4. Define the View
Set the data aspect ratio to
[1,1,1] so that the display is in correct proportions (
daspect). Eliminate white space within the axes and set the view to 3-D (
5. Add Lighting
To add fairly uniform lighting, but still take advantage of the ability of light sources to make visible subtle variations in shape, this example uses two lights, one to the left and one to the right of the camera (
camlight). Use Phong lighting to produce the smoothest variation of color (
lighting). Phong lighting requires the
|Isocaps Add Context to Visualizations||Visualizing Vector Volume Data|
© 1994-2005 The MathWorks, Inc.