function out=ffill(p,cc) % % FFILL(p,cc) p is a matrix w/ 2 rows containing the vertices % of a polygon. If no color cc is specified a random color % will be generated. SELFdemonstrating. % % FFILL calls FILL which closes the polygon if needed. The % main convenience is that the vertices are specified as a % single 2xN matrix, thereby facilitating block multipli- % cation on the left by matrices representing linear trans- % formations of the plane. % % All rights reserved. Documentation updated April 1999. % Matt Kawski. http://math.la.asu.edu/~kawski % if nargin < 1 out=fill(rand(1,55),rand(1,55),rand(1,3)) elseif nargin < 2 out=fill(p(1,:),p(2,:),rand(1,3)); else out=fill(p(1,:),p(2,:),cc); end;