import three; currentprojection=orthographic(0,0,1); triple[][] A={ {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)}, {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)}, {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)} }; triple[][] B={ {(0.5,0,-1),(0.5,1,-1),(0.5,2,-1),(0.5,3,-1)}, {(0.5,0,0),(0.5,1,0),(0.5,2,0),(0.5,3,0)}, {(0.5,0,1),(0.5,1,1),(0.5,2,1),(0.5,3,1)}, {(0.5,0,2),(0.5,1,2),(0.5,2,2),(0.5,3,2)} }; split S=split(A,B,10); //write(S.T.length); for(int i=0; i < S.T.length; ++i) draw(surface(patch(S.T[i])),Pen(i)); draw(surface(patch(B)),blue);