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.

fill3Purpose2fill3Filled three-dimensional polygonsSyntaxDescriptionfill3(X,Y,Z,C)fill3(X,Y,Z,ColorSpec)fill3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...)fill3(...,'PropertyName',PropertyValue)h = fill3(...)The fill3 function creates flat-shaded and Gouraud-shaded polygons.fill3(X,Y,Z,C) fills three-dimensional polygons. X, Y, and Z triplets specifythe polygon vertices. If X, Y, or Z is a matrix, fill3 creates n polygons, where nis the number of columns in the matrix. fill3 closes the polygons byconnecting the last vertex to the first when necessary.C specifies color, where C is a vector or matrix of indices into the currentcolormap. If C is a row vector, length(C) must equal size(X,2) and size(Y,2);if C is a column vector, length(C) must equal size(X,1) and size(Y,1).fill3(X,Y,Z,ColorSpec) fills three-dimensional polygons defined by X, Y,and Z with color specified by ColorSpec.fill3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...) specifies multiple filledthree-dimensional areas.fill3(...,'PropertyName',PropertyValue) allows you to set values forspecific patch properties.h = fill3(...) returns a vector of handles to patch graphics objects, onehandle per patch.AlgorithmIf X, Y, and Z are matrices of the same size, fill3 forms a vertex from thecorresponding elements of X, Y, and Z (all from the same matrix location), andcreates one polygon from the data in each column.If X, Y, or Z is a matrix, fill3 replicates any column vector argument to producematrices of the required size.If you specify color using ColorSpec, fill3 generates flat-shaded polygons andsets the patch object FaceColor property to an RGB triple.2-194

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

Saved successfully!

Ooh no, something went wrong!