Vector Field Displayed with Cone Plots
This example plots the velocity vector cones for the
wind data. The graph produced employs a number of visualization techniques:
1. Create an Isosurface
Displaying an isosurface within the rectangular space of the data provides a visual context for the cone plot. Creating the isosurface requires a number of steps:
patchto draw an isosurface illustrating where in the rectangular space the wind speed is equal to a particular value. Regions inside the isosurface have higher wind speeds, regions outside the isosurface have lower wind speeds.
isonormalsto compute vertex normals of the isosurface from the volume data rather than calculate the normals from the triangles used to render the isosurface. These normals generally produce more accurate results.
2. Add Isocaps to the Isosurface
Isocaps are similar to slice planes in that they show a cross section of the volume. They are designed to be the end caps of isosurfaces. Using interpolated face color on an isocap causes a mapping of data value to color in the current colormap. To create isocaps for the isosurface, define them at the same isovalue (
3. Create First Set of Cones
daspectto set the data aspect ratio of the axes before calling
coneplotso MATLAB can determine the proper size of the cones.
reducepatchto reduce the number of faces and vertices (so there are not too many cones on the graph).
4. Create Second Set of Cones
5. Define the View
axiscommand to set the axis limits equal to the minimum and maximum values of the data and enclose the graph in a box to improve the sense of a volume (
6. Add Lighting
Add a light source and use Phong lighting for the smoothest lighting of the isosurface (Phong lighting requires the Z-buffer renderer). Increase the strength of the background lighting on the isocaps to make them brighter (
|Creating Stream Particle Animations|
© 1994-2005 The MathWorks, Inc.