load (draw); /* Anzahl der Rechtecke */ xA : 4; yA : 4; /* Breite der Rechtecke */ xw : 10; yw : 10; orangelist1 : [ [0,0], [1,1], [2,2], [3,3] ]; orangelist2 : [ [0,0], [0,1], [0,2], [0,3] ]; make_my_mesh(orangelist) := block ([], mesh : [], for i : 0 while i < xA do for k : 0 while k < yA do block ([], p1 : [i*xw,k*yw], p2 : [(i+1)*xw,(k+1)*yw], if (member ([i,k], orangelist)) then com : [fill_color=red, rectangle(p1,p2)] else com : [fill_color=white, rectangle(p1,p2)], mesh : append (mesh, [com]) ), mesh ); mesh1 : make_my_mesh(orangelist1); mesh2 : make_my_mesh(orangelist2); imgoptions : [ xtics = false, ytics = false, line_width = 6, color = black, points_joined = true, terminal = png ]; draw2d ( imgoptions, mesh1, file_name = "fliesenflaeche1" ); draw2d ( imgoptions, mesh2, file_name = "fliesenflaeche2" );