%% Create Filled 3-D Polygon
% Create four triangles with interpolated colors.

% Copyright 2015 The MathWorks, Inc.


X = [0 1 1 2; 1 1 2 2; 0 0 1 1];
Y = [1 1 1 1; 1 0 1 0; 0 0 0 0];
Z = [1 1 1 1; 1 0 1 0; 0 0 0 0];
C = [0.5000 1.0000 1.0000 0.5000;
     1.0000 0.5000 0.5000 0.1667;
     0.3330 0.3330 0.5000 0.5000];

figure
fill3(X,Y,Z,C)