12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Patch PropertiesFaceColor{ColorSpec} | none | flat | interpColor of the patch face. This property can be any of the following:• ColorSpec – A three-element RGB vector or one of <strong>MATLAB</strong>’s predefinednames, specifying a single color for faces. See ColorSpec for moreinformation on specifying color.• none – Do not draw faces. Note that edges are drawn independently of faces.• flat – The values of CData or FaceVertexCData determine the color for eachface in the patch. The color data at the first vertex determines the color of theentire face.• interp – Bilinear interpolation of the color at each vertex determines thecoloring of each face.FaceLighting{none} | flat | gouraud | phongAlgorithm used for lighting calculations. This property selects the algorithmused to calculate the effect of light objects on patch faces. Choices are:• none – Lights do not affect the faces of this object.• flat – The effect of light objects is uniform across the faces of the patch.Select this choice to view faceted objects.• gouraud – The effect of light objects is calculated at the vertices and thenlinearly interpolated across the faces. Select this choice to view curvedsurfaces.• phong – The effect of light objects is determined by interpolating the vertexnormals across each face and calculating the reflectance at each pixel. Selectthis choice to view curved surfaces. Phong lighting generally produces betterresults than Gouraud lighting, but takes longer to render.Facesm-by-n matrixVertex connection defining each face. This property is the connection matrixspecifying which vertices in the Vertices property are connected. The Facesmatrix defines m faces with up to n vertices each. Each row designates theconnections for a single face, and the number of elements in that row that arenot NaN defines the number of vertices for that face.The Faces and Vertices properties provide an alternative way to specify apatch that can be more efficient than using x, y, and z coordinates in most2-331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!