Question: plot of an array 2 dimension

I draw tiles, i want to utilise un plot of an array 2 dimension. But i have had a good solution ?

I input data by hand :

> with(plottools);
> with(plots);

 > a := proc (i, j) options operator, arrow; polygon([[i, j], [i, j+1], [i+1, j+1], [i+1, j]], color = red) end proc; b := proc (i, j) options operator, arrow; polygon([[i, j], [i, j+1], [i+1, j+1], [i+1, j]], color = green) end proc;

> display([a(-1, -1), a(0, 0), a(1, 1), a(2, 2), a(1, -1), a(-1, 1), b(1, 0), b(0, 1), b(-1, 0), b(0, -1), a(-2, -2)], axes = none);

 

Please Wait...