## Asymptote Generalities – fig1970

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 2 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import patterns;

filldraw(xscale(2)*unitsquare,pattern("hatchback"));

filldraw(shift(0,-2)*yscale(2)*unitsquare,pattern("r_hatchback"));

filldraw(shift(1,-2)*yscale(2)*unitsquare,pattern("b_hatchback"));



Étiquettes : , ,

## Asymptote using graph.asy – fig0220

Category: Asymptote,Examples 2D,graph.asyPh. Ivaldi @ 23 h 10 min

 (Compiled with Asymptote version 2.14svn-r5318)

/*One can see this graphe drawed with my package HERE*/
import graph;
import patterns;
usepackage("mathrsfs");

unitsize(2cm,1.5cm);
real xmin=-1,xmax=4;
real ymin=-1,ymax=5;

// Definition of fonctions f and 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;}

// Trace the curves :
path Cf=graph(f,xmin,xmax,n=400);
path Cg=graph(g,xmin,xmax,n=400);
draw(Cf,linewidth(1bp));
draw(Cg,linewidth(1bp));
xlimits(xmin,xmax,Crop);
ylimits(ymin,ymax,Crop);

// The grid :
xaxis(BottomTop, xmin, xmax, Ticks("%", Step=1, step=0.5, extend=true, ptick=lightgrey));
yaxis(LeftRight, ymin, ymax, Ticks("%", Step=1, step=0.5, extend=true, ptick=lightgrey));
// The axis.
xequals(Label("$y$",align=W),0,ymin=ymin-0.25, ymax=ymax+0.25,
Ticks(NoZero,pTick=nullpen, ptick=grey),
p=linewidth(1pt), Arrow(2mm));
yequals(Label("$x$",align=S),0,xmin=xmin-0.25, xmax=xmax+0.25,
Ticks(NoZero,pTick=nullpen, ptick=grey),
p=linewidth(1pt), Arrow(2mm));

labelx(Label("$O$",NoFill), 0, SW);
draw(Label("$\vec{\imath}$",align=S,UnFill),
(0,0)--(1,0),scale(2)*currentpen,Arrow);
draw(Label("$\vec{\jmath}$",align=W,UnFill),
(0,0)--(0,1),scale(2)*currentpen,Arrow);
dot((0,0));

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);
fill(buildcycle(vline,graph(f,1,4),graph(g,1,4)),pattern("hachure"));



Étiquettes : , , , , ,

## Unofficial package graph_pi.asy – fig0060

Category: Asymptote,graph_pi.asy,Unofficial packagesPh. Ivaldi @ 10 h 50 min

 (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);
fill(buildcycle(vline,graph(f,1,4),graph(g,1,4)),pattern("hachure"));



Étiquettes : , ,

## Official Asymptote example – hatch

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 22 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(0,100);
import patterns;

real s=1.25;
filldraw(unitsquare,pattern("hatch"));
filldraw(shift(s,0)*unitsquare,pattern("hatchback"));
filldraw(shift(2s,0)*unitsquare,pattern("crosshatch"));



Étiquettes : , ,

## Official Asymptote example – shadedtiling

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 15 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(0,100);
import patterns;

real d=4mm;
picture tiling;
path square=scale(d)*unitsquare;
fill(tiling,shift(d,d)*square,blue);



Étiquettes : , , ,

## Official Asymptote example – tile

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 2 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(0,90);
import patterns;