%@AUTEUR:Guillaume Connan
prologues:=2;
verbatimtex
%&latex
\documentclass{article}
\usepackage[upright]{fourier}
\let\ve\vec
\begin{document}
etex
input geometriesyr16
figure(-10cm,-5cm,12cm,10cm);
%addition de deux vecteurs(parallelogramme)
pair t,r,s;
t=(2u,1u);
r=(-2u,3u);
transform T,R;
T= identity shifted t;
R= identity shifted r;
z0=(0,0);z1= z0 transformed T;
z2=z0 transformed R;z3=z1+z2;
drawarrow z0--z1 withcolor 0.6white;
drawarrow z0--z2 withcolor 0.6white;
drawarrow z0--z3 withcolor 0.4white withpen pencircle scaled 1.8bp;
label.bot(btex $A$ etex, z0);
label.rt(btex $B$ etex, z1);
label.top(btex $D$ etex, z2);
label.top(btex $C$ etex, z3);
label.bot(btex $\ve{u}$ etex, 0.5[z0,z1]);
label.bot(btex $\ve{v}$ etex, 0.5[z0,z2]);
label.lft(btex $\ve{u}+\ve{v}$ etex, 0.7[z0,z3]);
draw z2--z3 dashed evenly;
draw z1--z3 dashed evenly;
fin;
end