Voici le code :
input geometriesyr16.mp ; input dlf_tex.mp; %------------------------------------------------------------------------ % pavage 1 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; path tri; tri:=O--B--C--cycle ; fill tri withcolor orange; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %------------------------------------------------------------------------ % pavage 2 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; path tri; tri:=A--B--C--cycle ; fill tri withcolor orange; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %------------------------------------------------------------------------ % pavage 3 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; trace (u,0)--(u,0.5u)--(1.5u,0.5u)--(1.5u,1.5u)--(u,1.5u)--(u,2u) withcolor orange withpen pencircle scaled 3bp; trace (2u,u)--(0,u) withcolor orange withpen pencircle scaled 3bp; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %------------------------------------------------------------------------ % pavage 4 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; path tri; tri:=A--B--C--(1.5u,0.5u)--cycle ; fill tri withcolor orange; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %------------------------------------------------------------------------ % pavage 5 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; path tri; tri:=A--(0.5u,0)--(0.5u,0.5u)--(0,0.5u)--cycle ; fill tri withcolor orange; tri:=C--(1.5u,2u)--(1.5u,1.5u)--(2u,1.5u)--cycle ; fill tri withcolor orange; %trace (0.5u,0.5u)--(1.5u,1.5u) withcolor orange withpen pencircle scaled 3bp; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %------------------------------------------------------------------------ % pavage 6 %------------------------------------------------------------------------ u:=1cm; figure (-8u,-8u,20u,20u); pair A,B,C,D,O; A:=(0,0); B:=(2u,0); D:=(0,2u); C:= D shifted(B-A); O:= 0.5[A,C]; picture figd,figi,fig; currentpicture:=nullpicture; trace (0.5u,0)--(0.5u,1.5u)--(u,1.5u) withcolor orange withpen pencircle scaled 3bp; trace (0,u)--(0.5u,u) withcolor orange withpen pencircle scaled 3bp; trace (1.5u,u)--(2u,u) withcolor orange withpen pencircle scaled 3bp; trace (u,0.5u)--(1.5u,0.5u)--(1.5u,2u) withcolor orange withpen pencircle scaled 3bp; figd:=currentpicture; figi:=figd rotatedaround (O,180); for i:=0 upto 6: for j:=0 upto 6: fig :=figd shifted (i*4u,j*4u); draw fig;% withcolor green; fig :=figd shifted (i*4u+2u,j*4u+2u); draw fig;% withcolor green; fig :=figi shifted (i*4u+2u,j*4u); draw fig;% withcolor orange; fig :=figi shifted (i*4u,j*4u+2u); draw fig;% withcolor orange; endfor; endfor; marque_p:="croix"; nomme.urt(O); draw A--B--C--D--cycle; fin; %----------------------------------------------------------------------- %----------------------------------------------------------------------- end ;