%@AUTEUR:Guillaume Connan
prologues:=2;
input courbes;
input geo;
color vert_e, turquoise, orange, vert_fonce, rose, vert_mer, bleu_ciel, or, rouge_v,bleu_m,bleu,bleu_f;
vert_e:=(0,0.790002,0.340007);
turquoise:=(0.250999,0.878399,0.815699);
orange:=(0.589999,0.269997,0.080004);
vert_fonce:=(0,1.4*0.392193,0);
rose:=(1.0, 0.752907, 0.796106);
bleu_ciel:=(1.2*0.529405,1.2*0.807794,1);%.2*0.921598);
or:=(1,0.843104,0);
rouge_v:=(0.829997,0.099994,0.119999);
bleu_m:=(0.7*0.529405,0.7*0.807794,0.7);%*0.921598);
bleu_f:=(0.211762,0.3231176,0.3686392);
bleu:=(0.529405,0.807794,1);
beginfig(1);
numeric u;
u:=1cm;
pair o,a,b,c,d;
o=origin;
a=(sqrt(3)*u,-u);
b=a rotated 120;
c=b rotated 120;
d=a scaled -0.5;
drawarrow o--a withcolor bleu_f withpen pencircle scaled 1.5bp;
drawarrow o--b withcolor bleu_f withpen pencircle scaled 1.5bp;
drawarrow o--c withcolor bleu_f withpen pencircle scaled 1.5bp;
drawarrow o--d withcolor bleu_f withpen pencircle scaled 1.5bp;
drawarrow d--b dashed evenly withcolor bleu_f withpen pencircle scaled 1.5bp;
drawarrow d--a dashed evenly withcolor bleu_f withpen pencircle scaled 1.5bp;
label.bot(btex $\Omega$ etex,o shifted(0,-0.1*u));
label.rt(btex $A$ etex,a);
label.top(btex $B$ etex,b);
label.lft(btex $C$ etex,c);
label.lft(btex $D$ etex, d);
label.bot(btex $\overrightarrow{u}$ etex, o shifted (1.5*u,-2.2*u));
label.rt(btex $\overrightarrow{v}$ etex, o shifted (u,-1.5*u));
vardef axes =
drawarrow (ux*xmin,0)shifted (u,-2*u) -- (ux*xmax,0)shifted (u,-2*u); % axe des x
drawarrow (0,uy*ymin)shifted (u,-2*u) -- (0,uy*ymax)shifted (u,-2*u) ; % axe des y
label.lrt(btex $x$ etex,(xmax*ux,0)shifted (u,-2*u)); % label de l'axe des x
label.urt(btex $y$ etex,(0,ymax*uy)shifted (u,-2*u)); % label de l'axe des y
enddef;
% Déclarations des constantes
ux:=1cm; uy:=ux;
xmin:=-4.5; xmax:=4.5;
ymin:=-.5; ymax:=4.5;
coefficient:=1; % coefficient d'échelle
%Tracé des axes
axes;
label.llft(btex $0$ etex,(-.1*ux,-.15*uy)shifted (u,-2*u));
drawarrow o shifted (u,-2*u)--o shifted(2*u,-2*u) withpen pencircle scaled 1.5bp withcolor 0.2white;
drawarrow o shifted (u,-2*u)--o shifted(u,-u) withpen pencircle scaled 1.5bp withcolor 0.2white;
endfig;
end