|
Surface and Mesh Plots
Creating 3-D Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Changing Surface Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Creating the MATLAB Logo . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Representing Data as a Surface . . . . . . . . . . . . . . . . . . . . . . . . 1-28
Functions for Plotting Data Grids . . . . . . . . . . . . . . . . . . . . . 1-28
Functions for Gridding and Interpolating Data . . . . . . . . . . . 1-29
Mesh and Surface Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
Visualizing Functions of Two Variables . . . . . . . . . . . . . . . . . 1-30
Surface Plots of Nonuniformly Sampled Data . . . . . . . . . . . . 1-33
Reshaping Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
Parametric Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
Polygons
Introduction to Patch Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
What Are Patch Objects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Behavior of the patch Function . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Creating a Single Polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Multifaceted Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Example — Defining a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Volume Visualization
Overview of Volume Visualization . . . . . . . . . . . . . . . . . . . . . . . 3-2
Examples of Volume Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Selecting Visualization Techniques . . . . . . . . . . . . . . . . . . . . . 3-3
Steps to Create a Volume Visualization . . . . . . . . . . . . . . . . . . 3-3
Volume Visualization Functions . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Techniques for Visualizing Scalar Volume Data . . . . . . . . . . . . 3-6
What Is Scalar Volume Data? . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Ways to Display MRI Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Exploring Volumes with Slice Planes . . . . . . . . . . . . . . . . . . . . 3-14
Slicing Fluid Flow Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Modify the Color Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Connecting Equal Values with Isosurfaces . . . . . . . . . . . . . . . 3-22
Isosurfaces in Fluid Flow Data . . . . . . . . . . . . . . . . . . . . . . . 3-22
Isocaps Add Context to Visualizations . . . . . . . . . . . . . . . . . . . 3-24
What Are Isocaps? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Other Isocap Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Defining Isocaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Adding Isocaps to an Isosurface . . . . . . . . . . . . . . . . . . . . . . 3-27
Visualizing Vector Volume Data . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Lines, Particles, Ribbons, Streams, Tubes, and Cones . . . . . . 3-30
Using Scalar Techniques with Vector Data . . . . . . . . . . . . . . 3-30
Specifying Starting Points for Stream Plots . . . . . . . . . . . . . . 3-31
Accessing Subregions of Volume Data . . . . . . . . . . . . . . . . . . 3-35
Stream Line Plots of Vector Data . . . . . . . . . . . . . . . . . . . . . . . 3-37
Wind Mapping Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37
1. Determine the Range of the Coordinates . . . . . . . . . . . . . . 3-37
2. Add Slice Planes for Visual Context . . . . . . . . . . . . . . . . . . 3-37
3. Add Contour Lines to the Slice Planes . . . . . . . . . . . . . . . . 3-38
4. Define the Starting Points for Stream Lines . . . . . . . . . . . 3-38
5. Define the View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
Displaying Curl with Stream Ribbons . . . . . . . . . . . . . . . . . . . 3-40
What Stream Ribbons Can Show . . . . . . . . . . . . . . . . . . . . . . 3-40
1. Select a Subset of Data to Plot . . . . . . . . . . . . . . . . . . . . . 3-40
2. Calculate Curl Angular Velocity and Wind Speed . . . . . . . . 3-40
3. Create the Stream Ribbons . . . . . . . . . . . . . . . . . . . . . . . . 3-41
4. Define the View and Add Lighting . . . . . . . . . . . . . . . . . . . 3-41
Displaying Divergence with Stream Tubes . . . . . . . . . . . . . . . 3-43
What Stream Tubes Can Show . . . . . . . . . . . . . . . . . . . . . . . 3-43
1. Load Data and Calculate Required Values . . . . . . . . . . . . . 3-43
2. Draw the Slice Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
3. Add Contour Lines to Slice Planes . . . . . . . . . . . . . . . . . . . 3-44
4. Create the Stream Tubes . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
5. Define the View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
Creating Stream Particle Animations . . . . . . . . . . . . . . . . . . . 3-47
Projectile Path Over Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47
What Particle Animations Can Show . . . . . . . . . . . . . . . . . . . 3-48
1. Specify Starting Points of the Data Range . . . . . . . . . . . . . 3-49
2. Create Stream Lines to Indicate Particle Paths . . . . . . . . . 3-49
3. Define the View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
4. Calculate the Stream Particle Vertices . . . . . . . . . . . . . . . 3-49
Vector Field Displayed with Cone Plots . . . . . . . . . . . . . . . . . . 3-52
What Cone Plots Can Show . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52
1. Create an Isosurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52
2. Add Isocaps to the Isosurface . . . . . . . . . . . . . . . . . . . . . . 3-53
3. Create the First Set of Cones . . . . . . . . . . . . . . . . . . . . . . 3-53
4. Create Second Set of Cones . . . . . . . . . . . . . . . . . . . . . . . 3-54
5. Define the View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54
6. Add Lighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54
Visualizing Volume Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56
Visualizing Four-Dimensional Data . . . . . . . . . . . . . . . . . . . . . 3-63
Displaying Complex Three-Dimensional Objects . . . . . . . . . . 3-70
Displaying Topographic Data . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
|
|