input geometriesyr.mp ; %---------------------------------------------------------------------------- % Exercice 1 %---------------------------------------------------------------------------- u:=0.75cm; figure(-2u,-1u,15u,8u); label.bot(btex 13 ans etex,u*(1,0)); label.bot(btex 14 ans etex,u*(3,0)); label.bot(btex 15 ans etex,u*(5,0)); label.bot(btex 16 ans etex,u*(7,0)); label.bot(btex 17 ans etex,u*(9,0)); label.lft(btex 10 etex,u*(0,1)); label.lft(btex 20 etex,u*(0,2)); label.lft(btex 30 etex,u*(0,3)); label.lft(btex 40 etex,u*(0,4)); label.lft(btex 50 etex,u*(0,5)); label.rt(btex Nombre d'\'el\`eves etex,u*(0,6)); label.bot(btex Ages etex,u*(14,0)); path cc; cc:=(0,0)--(14u,0); for i:=0 step 1 until 5 : draw cc shifted (0,i*u) withcolor noir; endfor; for i:=0 step 1 until 5 : draw cc shifted (0,i*u+0.5u) withcolor 0.8[black,white]; endfor; drawarrow (0,0)--(0,6u); drawarrow (0,0)--(14u,0); path histo; histo:=(u,0)--(2u,0)--(2u,4u)--(u,4u)--cycle; color gris; gris=0.4[white,noir]; histo:=(0,0)--(2u,0)--(2u,0.5u)--(0,0.5u)--cycle; fill histo withcolor gris; draw histo; histo:=(2u,0)--(4u,0)--(4u,4.5u)--(2u,4.5u)--cycle; fill histo withcolor gris; draw histo; % histo:=(4u,0)--(6u,0)--(6u,3u)--(4u,3u)--cycle; % fill histo withcolor gris; % draw histo; histo:=(6u,0)--(8u,0)--(8u,2u)--(6u,2u)--cycle; fill histo withcolor gris; draw histo; histo:=(8u,0)--(10u,0)--(10u,u)--(8u,u)--cycle; fill histo withcolor gris; draw histo; fin; %--------------------------------------------------------------------------- %---------------------------------------------------------------------------- % Exercice 4 géométrique %---------------------------------------------------------------------------- u:=1cm; figure (-8u,-8u,8u,8u); pair O,A,B; path cc; O=(0,0); cc= cercles(O,3u); A=point(0) of cc; B= point(length cc *15/360) of cc; draw cc; draw O--A; draw O--B; label.top(btex 13 ans etex, (2u,0)); fin; %--------------------------------------------------------------------------- %---------------------------------------------------------------------------- % Exercice 2 géométrique %---------------------------------------------------------------------------- u:=0.75cm; figure (-8u,-8u,8u,8u); pair A,B,C,D,S,H; B=(0,0); A=(-2u,2u); C=(4u,1u); D= A shifted C; H=0.5[B,D]; S= H shifted (0,6u); draw S--A--B--C--cycle; draw S--B; draw S--D dashed evenly; draw S--H dashed evenly; draw A--D--C dashed evenly; draw A--C dashed evenly; draw B--D dashed evenly; trace codeperp(A,H,S,5); nomme.lft(A); nomme.bot(B); nomme.rt(C); nomme.urt(D); nomme.lrt(H); nomme.top(S); fin; %--------------------------------------------------------------------------- %---------------------------------------------------------------------------- % Exercice 1 géométrique %---------------------------------------------------------------------------- u:=1cm; figure (-8u,-8u,8u,8u); pair A,B,C; B=(0,0); C=(6u,0); A=(2u,5u); draw A--B--C--cycle; nomme.top(A); nomme.bot(B); nomme.bot(C); fin; %--------------------------------------------------------------------------- %---------------------------------------------------------------------------- % problème %---------------------------------------------------------------------------- u:=0.75cm; figure (-8u,-8u,10u,8u); pair A,B,C,D,E,O; A=(0,0); B=(8u,0); C=(8u,6u); D=(0,6u); E=(3u,0); O=0.5[A,C]; draw A--B--C--D--cycle; nomme.bot(A); nomme.bot(E); nomme.bot(B); nomme.top(C); nomme.top(D); nomme.ulft(O); marque_p :="croix"; MarquePoint(O); MarquePoint(E); fin; %--------------------------------------------------------------------------- %--------------------------------------------------------------------------- end ;