05 Nov 2007

Unofficial package graph_pi.asy – fig0060

Figure 0006
(Compiled with Asymptote version 2.14svn-r5318)
    
import graph_pi;
import patterns;

graphicrules(xunit=2.5cm,yunit=1.5cm, xmin=-1, xmax=4, ymin=-1, ymax=5,
             crop=Crop);

// Définition des fonctions f et g :
real f(real x) {return 4x-x^2+4/(x^2+1)^2;}
real g(real x) {return x-1+4/(x^2+1)^2;}

// Tracé des courbes :
path Cf=graph(f,n=700);
path Cg=graph(g,n=700);
draw(Cf,linewidth(1bp));
draw(Cg,linewidth(1bp));
crop(currentpicture);

// La grille.
grid();
// Les axes.
cartesianaxis(xticks=Ticks(NoZero,ptick=grey),
              yticks=Ticks(NoZero,ptick=grey),arrow=None);
labeloij(UnFill);

label("$\mathscr{C}_f$",(2.25,f(2.25)),2N);
label("$\mathscr{C}_f$",(2.25,g(2.25)),2S);

// Les hachures.
path vline=(1,-1)--(1,5);
add("hachure",hatch(3mm));
fill(buildcycle(vline,graph(f,1,4),graph(g,1,4)),pattern("hachure"));

Étiquettes : , ,