prologues := 3; % make it work with ps2pdf
outputtemplate := "%j-%c.eps"; % better file names

u := 0.24cm;
h := 10;
w := 4;
g := 1;
qx := (w + 6) * u;
qy := 0;%-(h + 5) * u;

beginfig(1)

pair pa[];
pa0 = (0, 0); pa1 = (0, h*u); pa2 = (pa0 + pa1) / 2; pa3 = (w*u, 0); pa4 = pa3 - pa0 + pa1;
dotlabel.lft(btex $A$ etex, pa0);
dotlabel.lft(btex $B$ etex, pa1);
dotlabel.lft(btex $C$ etex, pa2);
dotlabel.rt(btex $D$ etex, pa3);
dotlabel.rt(btex $E$ etex, pa4);
draw pa0--pa1;
draw pa2--pa3;
draw pa2--pa4;
label.bot(btex $\{AB{,}CD{,}CE\}$ etex, (pa0 + pa3) / 2 + (0, -g * u));

pair pb[];
pb0 = (qx, qy); pb1 = (qx, qy+0.4h*u); pb2 = (pb0 * 10 + pb1 * 15) / 25; pb4 = (qx+w*u, qy+h*u); pb3 = (qx+0.6w*u, qy+h*u);
dotlabel.lft(btex $A$ etex, pb0);
dotlabel.lft(btex $B$ etex, pb1);
dotlabel.lft(btex $C$ etex, pb2);
dotlabel.lft(btex $D$ etex, pb3);
dotlabel.rt(btex $E$ etex, pb4);
draw pb0--pb1;
draw pb2--pb3;
draw pb2--pb4;
label.bot(btex $\{AB{,}CD{,}CE\}$ etex, (qx+0.5w*u, qy) + (0, -g * u));

pair pc[];
pc0 = (2qx+0.7w*u, 2qy+h*u); pc1 = (2qx+w*u, 2qy+0.7h*u); pc2 = (pc0 + pc1) / 2; pc3 = (2qx, 2qy+0.85h*u); pc4 = (2qx+0.85w*u, 2qy);
dotlabel.lft(btex $A$ etex, pc0);
dotlabel.urt(btex $B$ etex, pc1);
dotlabel.urt(btex $C$ etex, pc2);
dotlabel.lft(btex $D$ etex, pc3);
dotlabel.rt(btex $E$ etex, pc4);
draw pc0--pc1;
draw pc2--pc3;
draw pc2--pc4;
label.bot(btex $\{AB{,}CD{,}CE\}$ etex, (2qx+0.5w*u, 2qy) + (0, -g * u));

endfig;

beginfig(2)

pair pa[];
pa0 = (0.5w*u, 0); pa1 = (0.5w*u, h*u); pa2 = (pa0 + pa1) / 2; pa3 = (0, 0.8h*u); pa4 = (w*u, 0.8h*u);
dotlabel.lft(btex $A$ etex, pa0);
dotlabel.lft(btex $B$ etex, pa1);
dotlabel.llft(btex $C$ etex, pa2);
dotlabel.lft(btex $D$ etex, pa3);
dotlabel.rt(btex $E$ etex, pa4);
draw pa0--pa1;
draw pa2--pa3;
draw pa2--pa4;
label.bot(btex $\{AB{,}CD{,}CE\}$ etex, pa0 + (0, -g * u));

pair pb[];
pb0 = (qx, qy); pb1 = (qx, qy+h*u); pb2 = (0.7pb0 + 0.3pb1); pb4 = (qx+w*u, qy+h*u); pb3 = (pb2 + pb4) / 2;
dotlabel.lft(btex $A$ etex, pb0);
dotlabel.lft(btex $B$ etex, pb1);
dotlabel.lft(btex $C$ etex, pb2);
dotlabel.rt(btex $D$ etex, pb3);
dotlabel.rt(btex $E$ etex, pb4);
draw pb0--pb1;
draw pb2--pb3;
draw pb2--pb4;
label.bot(btex $\{AB{,}CD{,}CE\}$ etex, (qx+0.5w*u, qy) + (0, -g * u));

pair pc[];
pc0 = (2qx, 2qy); pc1 = (2qx, 2qy+h*u); pc5 = (pc0 + pc1) / 2; pc3 = (2qx+w*u, 2qy+h*u); pc4 = (2qx+w*u, 2qy); pc2 = pc0*0.4+pc1*0.6;
dotlabel.lft(btex $A$ etex, pc0);
dotlabel.lft(btex $B$ etex, pc1);
dotlabel.lft(btex $C$ etex, pc2);
dotlabel.rt(btex $D$ etex, pc3);
dotlabel.rt(btex $E$ etex, pc4);
dotlabel.llft(btex $F$ etex, pc5);
draw pc0--pc1;
draw pc2--pc3;
draw pc5--pc4;
label.bot(btex $\{AB{,}CD{,}EF\}$ etex, (2qx+0.5w*u, 2qy) + (0, -g * u));

pair pd[];
pd0 = (3qx, 3qy); pd1 = (3qx, 3qy+h*u); pd2 = (3qx+w*u, 3qy+h*u); pd3 = (3qx+w*u, 3qy);
dotlabel.lft(btex $A$ etex, pd0);
dotlabel.lft(btex $B$ etex, pd1);
dotlabel.rt(btex $C$ etex, pd2);
dotlabel.rt(btex $D$ etex, pd3);
draw pd0--pd1;
draw pd0--pd2;
draw pd0--pd3;
label.bot(btex $\{AB{,}AC{,}AD\}$ etex, (3qx+0.5w*u, 3qy) + (0, -g * u));

endfig;

end.
