3-D Visualization    

Creating 3-D Models with Patches


Introduction to Patch Objects

A patch graphics object is composed of one or more polygons that may or may not be connected. Patches are useful for modeling real-world objects such as airplanes or automobiles, and for drawing 2- or 3-D polygons of arbitrary shape. In contrast, surface objects are rectangular grids of quadrilaterals and are better suited for displaying planar topographies such as the values of some mathematical functions, the contours of data in a rectangular plane, or parameterized surfaces such as a sphere.

A number of MATLAB functions create patch objects - fill, fill3, isosurface, isocaps, some of the contour functions, and patch. This section concentrates on use of the patch function.

Defining Patches

You define a patch by specifying the coordinates of its vertices and some form of color data. Patches support a variety of coloring options that are useful for visualizing data superimposed on geometric shapes.

There are two ways to specify a patch:

The second technique is preferred for multifaceted patches because it generally requires less data to define the patch; vertices shared by more than one face need be defined only once. This topic area provides examples of both techniques.


 Example: Modifying the Alphamap Behavior of the patch Function