Example — Vector Field Displayed with Cone Plots

What Cone Plots Can Show

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:

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 (isocaps, patch, colormap).

hcap = patch(isocaps(x,y,z,wind_speed,40),...
    'FaceColor','interp',...
    'EdgeColor','none');
colormap hsv

3. Create First Set of Cones

4. Create Second Set of Cones

5. Define the View

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 (camlight, lighting, AmbientStrength).

camlight(-45,45)
set(gcf,'Renderer','zbuffer'); 
lighting phong
set(hcap,'AmbientStrength',.6)

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS