Retour

Source : TrianglesLunules.mp

TrianglesLunules.mp
%@Auteur: Michel Girard
%@Date: 30 juin 2006
 
TrianglesLunules.mp (figure 1)
beginfig(1)
    numeric u; u:=6cm;
 
    pair A, B, C;
    B=origin;
    C=u*right;
    A=C rotated 60;
    dotlabel.llft (btex $B$ etex,B);
    dotlabel.lrt  (btex $C$ etex,C);
    dotlabel.top  (btex $A$ etex,A);
 
    pair I, J, K;
    I=.5[A,B];
    J=.5[B,C];
    K=.5[C,A];
    dotlabel.ulft (btex $I$ etex,I);
    dotlabel.bot  (btex $J$ etex,J);
    dotlabel.urt  (btex $K$ etex,K);
 
    pair D, E, F;
    D=1.15[A,J];
    F=1.15[B,K];
    E=1.15[C,I];
    dotlabel.ulft (btex $E$ etex,E);
    dotlabel.bot  (btex $D$ etex,D);
    dotlabel.urt  (btex $F$ etex,F);
 
    path dd, de, df; 
    dd=D-2*((A-J) rotated 90)
	--
	D+2*((A-J) rotated 90);
    de=E-2*((C-I) rotated 90)
	--
	E+2*((C-I) rotated 90);
    df=F-2*((B-K) rotated 90)
	--
	F+2*((B-K) rotated 90);
 
    pair Ap, Bp, Cp;
    Ap = de intersectionpoint df;
    Bp = de intersectionpoint dd;
    Cp = dd intersectionpoint df;
    dotlabel.llft (btex $B^\prime$ etex,Bp);
    dotlabel.lrt  (btex $C^\prime$ etex,Cp);
    dotlabel.top  (btex $A^\prime$ etex,Ap);
 
    numeric d.i, d.e;
    d.i = length (B-A);
    d.e = 2*length (B-D);
 
    path cc.i, cc.e,l;
    cc.i := fullcircle rotated -10
		scaled d.i shifted J;
    cc.e := fullcircle 
		scaled d.e shifted D;
    cc.e := subpath (.5*length cc.e,0) of cc.e;
    l = buildcycle(cc.i,cc.e);
    fill l withcolor .25white ;
    draw l withpen  pencircle scaled 2pt ;
 
    pair O;
    O = 2/3[A,J];
 
    path l.d, l.t;
    l.d = l rotatedaround(O,120);
    l.t = l rotatedaround(O,240);
    fill l.d withcolor .5white ;
    draw l.d withpen  pencircle scaled 2pt ;
    fill l.t withcolor .75white ;
    draw l.t withpen  pencircle scaled 2pt ;
 
    draw B -- C -- A -- cycle;
    draw Bp -- Cp -- Ap -- cycle;
    drawoptions (dashed evenly scaled 2 pt);
    draw A -- J; draw B -- K; draw C -- I;
    drawoptions (dashed evenly scaled .5 pt);
    draw D -- J; draw F -- K; draw E -- I;
 
endfig;
 
end