3-D Visualization Previous page   Next Page

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 mathematical functions of two variables, the contours of data in a rectangular plane, or parameterized surfaces such as spheres.

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 section provides examples of both techniques.


Previous page  Creating 3-D Models with Patches Behavior of the patch Function Next page

© 1994-2005 The MathWorks, Inc.