Page 1 sur 1

Figures de bac

Posté : mer. 9 déc. 2015, 19:54
par Nico56
Bonsoir, je vous propose des figures issues des documents de l'APMEP que j'ai retranscrites en asymptote.
Il est probable que les codes ne soient pas optimisés, mais cela me suffit.

2014 - septembre - Antilles et Guyane :

Figure asymptote e4b089ed45d7273b64eebe36a5ae5881
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2. graphicrules(xunit=4cm, yunit=8cm, xmin=-0.1, xmax=2.7, ymin=-0.1, ymax=1.1);
  3. cartesianaxis(extraheight=0,extrawidth=0,
  4. xticks=Ticks(Step=1,step=0.5,NoZero),
  5. yticks=Ticks(Step=1,step=0.5,NoZero)
  6. );
  7.  
  8. real f(real t) {return t/exp(t);}
  9. path Cf=graph(f,0.01,2.7,n=100);
  10. draw(Cf,linewidth(0.75bp));
  11. label("$\mathcal{C}_{f}$",(1.8,0.35));
  12.  
  13. real g(real t) {return t;}
  14. path Cg=graph(g,0,1.1,n=2);
  15. draw(Cg,linewidth(0.75bp));
  16. label("$\Delta$",(0.7,0.8));
  17.  
  18. label("$O$",(-0.1,-0.05));
  19.  
  20. ylimits(-0.1,1.1,Crop);
  21. shipout(bbox(0.1cm,0.1cm,invisible));


Le corrigé :

Figure asymptote 377ceebd5ce17a90dc929eaa282e7dd2
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2. graphicrules(xunit=4cm, yunit=8cm, xmin=-0.1, xmax=2.7, ymin=-0.1, ymax=1.1);
  3. cartesianaxis(extraheight=0,extrawidth=0,
  4. xticks=Ticks(Step=1,step=0.5,NoZero),
  5. yticks=Ticks(Step=1,step=0.5,NoZero)
  6. );
  7. real f(real t) {return t/exp(t);}
  8. path Cf=graph(f,0.01,2.7,n=100);
  9. draw(Cf,linewidth(0.75bp));
  10. label("$\mathcal{C}_{f}$",(1.8,0.35));
  11.  
  12. real g(real t) {return t;}
  13. path Cg=graph(g,0,1.1,n=2);
  14. draw(Cg,linewidth(0.75bp));
  15. label("$\Delta$",(0.7,0.8));
  16.  
  17. label("$O$",(-0.1,-0.05));
  18.  
  19. pair A,B,C,fA,ffA,fB,ffB;
  20. A=(1,0);
  21. fA=(1,f(1));
  22. ffA=(f(1),f(1));
  23. B=(f(1),0);
  24. fB=(f(1),f(f(1)));
  25. ffB=(f(f(1)),f(f(1)));
  26. C=(f(f(1)),0);
  27.  
  28. draw(A--fA--ffA--B, dashed);
  29. draw(fB--ffB--C, dashed);
  30.  
  31. label("$A_0$",A,S);
  32. label("$A_1$",B,S);
  33. label("$A_2$",C,S);
  34.  
  35. ylimits(-0.1,1.1,Crop);
  36. shipout(bbox(0.1cm,0.1cm,invisible));


2014 - Amérique du Nord - Exercice 2 :

Figure asymptote c3b581c1b09b859909722eebf09494ce
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=2.5cm, yunit=2cm, xmin=0, xmax=4.5, ymin=-3.2, ymax=1.5);
  4. grid(pTick=gray(0.8),xmin=0,xstep=0,ystep=0.25); //,ptick=gray(0.8)
  5.  
  6. cartesianaxis(extraheight=1,extrawidth=1,
  7. xticks=Ticks(Step=1,step=0,NoZero),
  8. yticks=Ticks(Step=1,step=0.5,NoZero)
  9. );
  10.  
  11. real f(real t){return 5*exp(-t)-3*exp(-2t)+t-3;}
  12. path Cf=graph(f,0,4.5,n=300);
  13. draw(Cf,linewidth(0.75bp));
  14.  
  15. real g(real t){return t-3;}
  16. path Cg=graph(g,0,4.5,n=2);
  17. draw(Cg,linewidth(0.75bp));
  18.  
  19. label("$\mathcal{C}_f$",(4,1.25),NW);
  20. label("$\mathcal{D}$",(4,1),SE);
  21.  
  22. shipout(bbox(0.1cm,0.1cm,invisible));


2014 - Amérique du Sud - Exercice 4, figure 1:

Figure asymptote 5f8a0ca3101661226b57510b4bf11c64
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. unitsize(2.8cm,1.5cm);
  2. import graph;
  3. real f(real t){return (t+0.25)*exp(-4t)+1.25;}
  4. path Cf=graph(f,0,2,n=300);
  5. draw(Cf,linewidth(0.75bp));
  6. real g(real t){return (-t+0.25)*exp(4t)+1.25;}
  7. path Cg=graph(g,-2,0,n=300);
  8. draw(Cg,linewidth(0.75bp));
  9. draw((-2.5,-2)--(-2,-2)--(-2,2)--(-2.5,2)--cycle);
  10. draw(shift(4.5,0)*((-2.5,-2)--(-2,-2)--(-2,2)--(-2.5,2)--cycle));
  11. label("pilier gauche",(-2.25,-2.5));
  12. label("pilier droit",(2.25,-2.5));
  13. label("vantail de gauche",(-1,-2.5));
  14. label("vantail de droite",(1,-2.5));
  15. draw((0,-1.8)--(0,1.5));
  16. draw((-2,-1.8)--(2,-1.8));
  17. shipout(bbox(0.1cm,0.1cm,invisible));


Figure 2 :

Figure asymptote a1647613bca1a4bb01077bfcf183e856
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2. graphicrules(xunit=5cm, yunit=4cm, xmin=-0.15, xmax=2.4,ymin=-0.1, ymax=1.6);
  3. cartesianaxis(extraheight=.5,extrawidth=1.5,
  4. xticks=Ticks(Step=0.5,step=0,NoZero,Size=1mm),
  5. yticks=Ticks(Step=0.5,step=0,NoZero,Size=1mm)
  6. );
  7.  
  8. real f(real t) {return (t+0.25)*exp(-4t)+1.25;}
  9. path Cf=graph(f,0,1.87,n=100);
  10. draw(Cf);
  11.  
  12. real larg=.12, esp=.05, lx = larg+esp;
  13. draw((0,esp)--(1.87,esp));
  14.  
  15. for (int i=0; i<=11; ++i){
  16. filldraw((lx*i,esp)--(lx*i,f(i*lx))--(larg+lx*i,f(i*lx))--(larg+lx*i,esp)--cycle,lightgray);
  17. }
  18.  
  19. draw((2,1.58)--(2,0)--(2.4,0)--(2.4,1.58)--(2,1.58));
  20.  
  21. shipout(bbox(0.1cm,0.1cm,invisible));


2014- Pondichéry - Exercice 4, figure 1 :

Figure asymptote 83c40745e3709d0210197ffafe38545b
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=0.7cm, yunit=0.7cm, xmin=-3, xmax=5,ymin=-2, ymax=10);
  4. cartesianaxis(extraheight=0,extrawidth=0,
  5. xticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm),
  6. yticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm)
  7. );
  8. grid(pTick=gray(0.8),xstep=0,ystep=0); //,ptick=gray(0.8)
  9.  
  10. real f(real t) {return 2t+1+exp(-t);}
  11. path Cf=graph(f,-3,4.5,n=300);
  12. draw(Cf,linewidth(0.75bp));
  13. label("$\mathcal{C}_{1}$",(-2.5,8),E);
  14.  
  15. real[] xpt={-1.5,-1,0,1,2,3,4,4.5};
  16. real[] ypt={-2.2,-0.8,1,1.6,1.85,1.95,2,1.98};
  17.  
  18. draw(graph(xpt,ypt,Hermite(monotonic)),linewidth(0.75bp));
  19. label("$\mathcal{C}_{2}$",(3,2),N);
  20. ylimits(-2,10,Crop);
  21. shipout(bbox(0.1cm,0.1cm,invisible));


Figure 2 :

Figure asymptote cdff3928501e22121bee3585b510aee5
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=0.7cm, yunit=0.7cm, xmin=-3, xmax=5,ymin=-2, ymax=10);
  4. cartesianaxis(extraheight=0,extrawidth=0,
  5. xticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm),
  6. yticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm)
  7. );
  8. grid(pTick=gray(0.8),xstep=0,ystep=0); //,ptick=gray(0.8)
  9.  
  10. real f(real t) {return 2t+1+exp(-t);}
  11. path Cf=graph(f,-3,4.5,n=300);
  12. draw(Cf,linewidth(0.75bp));
  13. label("$\mathcal{C}_{1}$",(-2.5,8),E);
  14.  
  15. real g(real t) {return t+1;}
  16. path Cg=graph(g,-3,5,n=2);
  17. draw(Cg,linewidth(0.75bp));
  18. label("$\mathcal{C}_{2}$",(4,5),SE);
  19.  
  20. ylimits(-2,10,Crop);
  21. shipout(bbox(0.1cm,0.1cm,invisible));


Figure 3 :

Figure asymptote 460a87ba1cc2d735e268932cd4f9a2ff
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=0.7cm, yunit=0.7cm, xmin=-3, xmax=5,ymin=-2, ymax=10);
  4. cartesianaxis(extraheight=0,extrawidth=0,
  5. xticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm),
  6. yticks=Ticks(scale(.7)*Label(),Step=1,step=0,NoZero,end=false,endlabel=false,begin=false,beginlabel=false,Size=1mm)
  7. );
  8. grid(pTick=gray(0.8),xstep=0,ystep=0); //,ptick=gray(0.8)
  9.  
  10. real f(real t) {return 2t+1+exp(-t);}
  11. path Cf=graph(f,-3,4.5,n=300);
  12. draw(Cf,linewidth(0.75bp));
  13. label("$\mathcal{C}_{1}$",(-2.5,8),E);
  14.  
  15. real g(real t) {return 2t+exp(-t);}
  16. path Cg=graph(g,-3,5,n=300);
  17. draw(Cg,linewidth(0.75bp));
  18. label("$\mathcal{C}_{2}$",(3,6),SE);
  19.  
  20. ylimits(-2,10,Crop);
  21. shipout(bbox(0.1cm,0.1cm,invisible));


Figure 4 :

Figure asymptote 1af7cd8f0ce091e57137354de571d98f
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=0.8cm, yunit=0.8cm, xmin=-2, xmax=2,ymin=-1, ymax=6);
  4.  
  5. real f(real t) {return 2t+1+exp(-t);}
  6. path Cf=graph(f,-2,2,n=300);
  7. draw(Cf,linewidth(0.5bp));
  8.  
  9. real g(real t) {return t+2;}
  10. path Cg=graph(g,-2,2,n=2);
  11. draw(Cg,linewidth(0.5bp));
  12.  
  13. draw((-2,0)--(2,0)--(2,f(2))--(-2,f(-2))--(-2,0));
  14. fill((graph(f,-2,2))--(2,4)--(-2,0)--cycle,lightblue+opacity(.3));
  15.  
  16. ylimits(-1,6,Crop);
  17. shipout(bbox(0.1cm,0.1cm,invisible));


Figure 5 :

Figure asymptote e39b76d938bb3507cfafe957da054db1
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***

CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
  1. import graph_pi;
  2.  
  3. graphicrules(xunit=0.8cm, yunit=0.8cm, xmin=-3, xmax=3, ymin=-1, ymax=6);
  4. cartesianaxis(extraheight=0,extrawidth=1,
  5. xticks=Ticks("%",step=1,Size=.5mm),
  6. yticks=Ticks("%",step=1,Size=.5mm),
  7. arrow=None);
  8. labeloij(p=currentpen);
  9.  
  10. real f(real t) {return 2t+1+exp(-t);}
  11. path Cf=graph(f,-2,2,n=300);
  12. draw(Cf,linewidth(0.5bp));
  13.  
  14. real g(real t) {return t+2;}
  15. path Cg=graph(g,-2,2,n=2);
  16. draw(Cg,linewidth(0.5bp));
  17.  
  18. draw((-2,0)--(2,0)--(2,f(2))--(-2,f(-2))--(-2,0));
  19. fill((graph(f,-2,2))--(2,4)--(-2,0)--cycle,lightblue+opacity(.3));
  20.  
  21. label("$D$",(-2,0),S);
  22. label("$E$",(2,0),S);
  23. label("$F$",(2,f(2)),NE);
  24. label("$G$",(-2,f(-2)),NW);
  25. ylimits(-1,6,Crop);
  26. shipout(bbox(0.1cm,0.1cm,invisible));