// gm.asy est une extension personnelle (avec des définitions en phase de test) // téléchargeable ici : gm.asy import three; import gm; // currentprojection=obliqueX; currentprojection=cavaliereX; // défini dans gm.asy viewportmargin=(2mm,2mm); // pour laisser une zone blanche de 2mm autour currentlight=nolight; size(7.5cm,0); real a=1; transform r=rotate(90,(2a,2a)); path p1 = (a,0)--(4a,3a)--(4a,a)--(a,4a)--(3a,4a)--(0,a)--(0,3a)--(3a,0)--cycle, penta = (0,0)--(a,0)--(2a,a)--(a,2a)--(0,a)--cycle, p2[] = penta ^^ r*penta ^^ r^2*penta ^^ r^3*penta; transform3 tX=shift(4a*X), tY=shift(4a*Y), tZ=shift(4a*Z); path3 f1=path3(p1,XYplane), g1[]=path3(p2,XYplane), f2=path3(p1,YZplane), g2[]=path3(p2,YZplane), f3=path3(p1,ZXplane), g3[]=path3(p2,ZXplane), f[]=f1^^f2^^f3^^tZ*f1^^tX*f2^^tY*f3, g[]=g1^^g2^^g3^^tZ*g1^^tX*g2^^tY*g3; draw(surface(f),grey); draw(surface(g),white); draw(box((0,0,0),(4a,4a,4a)),1bp+blue);