Name

fill3 — Display 3-D filled polygons with pseudo-color

Calling Sequence

hdl = fill3(X,Y,Z,C)

Parameter

X

m by n matrix

Y

m by n matrix

Z

m by n matrix

C

1 by n matrix or m by n matrix

hdl

Handle of the created Fac3d entity

Description

fill3(X,Y,Z,C) displays 3D filled m-vertices polygons. When C is a vector then C(i) gives the value for polygon i. The actual color is computed by mapping the minimum and maximum value of C to the RBG colormap of the current figure. The actual scale can be controlled by the 'caxis' property.

When X,Y,Z and C are matrices of the same size, the color is given by the first vertex of each polygon or interpolated, depending on the 'shading' property.

Examples

x=[0 1 1 0]';y=[0 0 1 1]';c=[1 2 3 4]';
fill3([x 1+x x],[y y 1+y],[x y y],[c 2+c 3+c],'facecolor','interp');
axis equal

Screenshot

See Also

fill , surf , colormap , shading , caxis , colorbar

Authors

Stéphane Mottelet