// Fichier polyhedron_js.asy, téléchargeable ici : polyhedron_js.asy import solids; import polyhedron_js; currentprojection=orthographic(5,3,4); size(7.5cm); real a=10,b=8,c=6; polyhedron pave; pave[0]=(0,0,0)--(a,0,0)--(a,b,0)--(0,b,0)--cycle; pave[1]=(0,0,0)--(a,0,0)--(a,0,c)--(0,0,c)--cycle; pave[2]=(0,b,0)--(0,0,0)--(0,0,c)--(0,b,c)--cycle; pave[3]=(a,0,0)--(a,b,0)--(a,b,c)--(a,0,c)--cycle; pave[4]=(a,b,0)--(0,b,0)--(0,b,c)--(a,b,c)--cycle; pave[5]=(0,0,c)--(a,0,c)--(a,b,c)--(0,b,c)--cycle; // Compilé avec render=4, l'ordre des faces // a une incidence pour avoir un éclairage satisfaisant. pave=shift(-(a/2)*X-(b/2)*Y-(c/2)*Z)*pave; limits(O,(a/2+1)*X+(b/2+1)*Y+(c/2+1)*Z); xaxis3(scale(1.5)*Label("$x$",1),1bp+green,Arrow3); yaxis3(scale(1.5)*Label("$y$",1),1bp+green,Arrow3); zaxis3(scale(1.5)*Label("$z$",1),1bp+green,Arrow3); for (int i=0; i<=5; ++i){ draw(surface(scale3(.866)*pave[i]),white+opacity(.75),1bp+black); }