import graph_pi; import patterns; usepackage("mathrsfs"); size(10cm,0); graphicrules(xunit=1cm, yunit=1cm, xmin=-2, xmax=4, ymin=-1, ymax=5, crop=Crop ); // Définition et tracé de la grille grid(xStep=1, xstep=.5, yStep=1, ystep=.5, pTick=.7bp+.7white, ptick=.7bp+dotted+.7white, above=false ); // Définition et tracé des axes cartesianaxis( xticks=Ticks(Label(Fill(white)), Step=1, step=.5, NoZero, ptick=grey), yticks=Ticks(Label(Fill(white)), Step=2, step=1, NoZero, ptick=grey), Arrow ); // Définition de la fonction real f(real x) {return 4-(x-1)^2;} // Les hachures. path zonehachuree=buildcycle((3,0)--(0,0)--(0,3),graph(f,0,3)); add("hachure",hatch(H=3mm,dir=NE,red)); fill(zonehachuree,pattern("hachure")); // Tracé de courbe path Cf=graph(f,-3,5,n=400); draw(Cf,linewidth(1bp)+blue); xlimits(-2.5,4.5,Crop); ylimits(-1.5,5.5,Crop); label("$\mathscr{C}_f$",(1,f(1)),NE); labeloij(p=1.4bp+.5*red, arrow=Arrow(SimpleHead,8bp), dot );