Asymptote Generalities – fig0300

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

Figure 0030
(Compiled with Asymptote version 2.14svn-r5318)
    
size(8cm,0);

transform T=shift(0,-0.125);
path g=(0,0)--(1,0);
int i=-1;
draw(T^(++i)*g, Arrows());
draw(T^(++i)*g, 0.8*green, Arrows(SimpleHead));
draw(T^(++i)*g, 0.8*red, Arrows(SimpleHead,size=5mm));

draw(T^(++i)*g, Arrows(HookHead));
draw(T^(++i)*g, 0.8*green, Arrows(HookHead,size=5mm));
draw(T^(++i)*g, 0.8*red, Arrows(HookHead(barb=20),size=5mm));
draw(T^(++i)*g, 2mm+0.8*blue, Arrows(HookHead(dir=60),size=5mm, Fill));

draw(T^(++i)*g, 0.8*yellow, Arrows(HookHead(barb=-10,dir=40),size=5mm));

draw(T^(++i)*g, Arrows(TeXHead));
draw(T^(++i)*g, 0.8*green, Arrows(TeXHead,size=5bp));
draw(T^(++i)*g, 5bp+0.8*red, Arrows(TeXHead));

Étiquettes : ,


Asymptote Generalities – fig0310

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

Figure 0031
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);
draw(line,Arrow);
draw(shift(0,-cm)*line, BeginArrow);
draw(shift(0,-2cm)*line, MidArrow);
draw(shift(0,-3cm)*line, Arrows);

draw(shift(0,-4cm)*line, linewidth(3bp), Arrow(20bp));
draw(shift(0,-5cm)*line, linewidth(3bp), BeginArrow(20bp));
draw(shift(0,-6cm)*line, linewidth(3bp), MidArrow(20bp));
draw(shift(0,-7cm)*line, linewidth(3bp), Arrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0320

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

Figure 0032
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);
DefaultHead=HookHead;
draw(shift(6cm,0)*line,Arrow());
draw(shift(6cm,-cm)*line, BeginArrow());
draw(shift(6cm,-2cm)*line, MidArrow());
draw(shift(6cm,-3cm)*line, Arrows());

draw(shift(6cm,-4cm)*line, linewidth(3bp), Arrow(20bp));
draw(shift(6cm,-5cm)*line, linewidth(3bp), BeginArrow(20bp));
draw(shift(6cm,-6cm)*line, linewidth(3bp), MidArrow(20bp));
draw(shift(6cm,-7cm)*line, linewidth(3bp), Arrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0330

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

Figure 0033
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);
DefaultHead=SimpleHead;
draw(shift(6cm,0)*line,Arrow());
draw(shift(6cm,-cm)*line, BeginArrow());
draw(shift(6cm,-2cm)*line, MidArrow());
draw(shift(6cm,-3cm)*line, Arrows());

draw(shift(6cm,-4cm)*line, linewidth(3bp), Arrow(20bp));
draw(shift(6cm,-5cm)*line, linewidth(3bp), BeginArrow(20bp));
draw(shift(6cm,-6cm)*line, linewidth(3bp), MidArrow(20bp));
draw(shift(6cm,-7cm)*line, linewidth(3bp), Arrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0340

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

Figure 0034
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);
DefaultHead=TeXHead;
draw(shift(6cm,0)*line,Arrow());
draw(shift(6cm,-cm)*line, BeginArrow());
draw(shift(6cm,-2cm)*line, MidArrow());
draw(shift(6cm,-3cm)*line, Arrows());

draw(shift(6cm,-4cm)*line, linewidth(bp), Arrow());
draw(shift(6cm,-5cm)*line, linewidth(2bp), BeginArrow(5bp));
draw(shift(6cm,-6cm)*line, linewidth(2bp), MidArrow(5bp));
draw(shift(6cm,-7cm)*line, linewidth(2bp), Arrows(5bp));

Étiquettes : ,


Asymptote Generalities – fig0350

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

Figure 0035
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)..(2.5cm,2.5cm)..(5cm,0);
draw(line,ArcArrow);
draw(shift(0,-2cm)*line,BeginArcArrow);
draw(shift(0,-4cm)*line,MidArcArrow);
draw(shift(0,-6cm)*line,ArcArrows);

draw(shift(6cm,0)*line,3bp+.8red,ArcArrow(20bp));
draw(shift(6cm,-2cm)*line,3bp+.8red,BeginArcArrow(20bp));
draw(shift(6cm,-4cm)*line,3bp+.8red,MidArcArrow(20bp));
draw(shift(6cm,-6cm)*line,3bp+.8red,ArcArrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0360

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

Figure 0036
(Compiled with Asymptote version 2.14svn-r5318)
    
DefaultHead=HookHead;

path line=(0,0)..(2.5cm,2.5cm)..(5cm,0);
draw(line,ArcArrow());
draw(shift(0,-2cm)*line,BeginArcArrow());
draw(shift(0,-4cm)*line,MidArcArrow());
draw(shift(0,-6cm)*line,ArcArrows());

draw(shift(6cm,0)*line,3bp+.8red,ArcArrow(20bp));
draw(shift(6cm,-2cm)*line,3bp+.8red,BeginArcArrow(20bp));
draw(shift(6cm,-4cm)*line,3bp+.8red,MidArcArrow(20bp));
draw(shift(6cm,-6cm)*line,3bp+.8red,ArcArrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0370

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

Figure 0037
(Compiled with Asymptote version 2.14svn-r5318)
    
DefaultHead=SimpleHead;

path line=(0,0)..(2.5cm,2.5cm)..(5cm,0);
draw(line,ArcArrow());
draw(shift(0,-2cm)*line,BeginArcArrow());
draw(shift(0,-4cm)*line,MidArcArrow());
draw(shift(0,-6cm)*line,ArcArrows());

draw(shift(6cm,0)*line,3bp+.8red,ArcArrow(20bp));
draw(shift(6cm,-2cm)*line,3bp+.8red,BeginArcArrow(20bp));
draw(shift(6cm,-4cm)*line,3bp+.8red,MidArcArrow(20bp));
draw(shift(6cm,-6cm)*line,3bp+.8red,ArcArrows(20bp));

Étiquettes : ,


Asymptote Generalities – fig0380

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

Figure 0038
(Compiled with Asymptote version 2.14svn-r5318)
    
DefaultHead=TeXHead;

path line=(0,0)..(2.5cm,2.5cm)..(5cm,0);
draw(line,Arrow());
draw(shift(0,-2cm)*line,BeginArrow());
draw(shift(0,-4cm)*line,MidArrow());
draw(shift(0,-6cm)*line,Arrows());

draw(shift(6cm,0)*line,3bp+.8red,Arrow(5bp));
draw(shift(6cm,-2cm)*line,3bp+.8red,BeginArrow(5bp));
draw(shift(6cm,-4cm)*line,3bp+.8red,MidArrow(5bp));
draw(shift(6cm,-6cm)*line,3bp+.8red,Arrows(5bp));

Étiquettes : ,


Asymptote Generalities – fig0390

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

Figure 0039
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);

draw(line,Arrow(20bp,filltype=NoFill));
draw(shift(0,-cm)*line,Arrow(20bp,filltype=FillDraw(.8red)));
draw(shift(0,-2cm)*line,Arrow(20bp,filltype=Fill(.8red)));
draw(shift(0,-3cm)*line,Arrows(filltype=FillDraw(-10,10,.8red)));

Étiquettes : , ,


Asymptote Generalities – fig0400

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

Figure 0040
(Compiled with Asymptote version 2.14svn-r5318)
    
DefaultHead=HookHead;
path line=(0,0)--(5cm,0);

draw(line,Arrow(20bp,filltype=NoFill));
draw(shift(0,-cm)*line,Arrow(20bp,filltype=FillDraw(.8red)));
draw(shift(0,-2cm)*line,Arrow(20bp,filltype=Fill(.8red)));
draw(shift(0,-3cm)*line,Arrows(filltype=FillDraw(-10,10,.8red)));

Étiquettes : , ,


Asymptote Generalities – fig0410

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

Figure 0041
(Compiled with Asymptote version 2.14svn-r5318)
    
DefaultHead=TeXHead;
path line=(0,0)--(5cm,0);

draw(line,Arrow(10bp,filltype=NoFill));
draw(shift(0,-2cm)*line,Arrow(10bp,filltype=FillDraw(.8red)));
draw(shift(0,-4cm)*line,Arrow(10bp,filltype=Fill(.8red)));
draw(shift(0,-6cm)*line,Arrows(filltype=FillDraw(-10,10,.8red)));

Étiquettes : , ,


Asymptote Generalities – fig0420

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

Figure 0042
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);

draw(line,linewidth(5bp),Arrow);
draw(shift(0,-2cm)*line,linewidth(5bp),Arrow(30bp,10));
draw(shift(0,-5cm)*line,linewidth(30bp),Arrow(20bp,50));
draw(shift(0,-8cm)*line,linewidth(10bp),Arrow(20bp,50,filltype=NoFill));

Étiquettes : ,


Asymptote Generalities – fig0430

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

Figure 0043
(Compiled with Asymptote version 2.14svn-r5318)
    
size(5cm,0);
path line=(0,0)--(5,0);

draw(line,Arrow(20bp,position=.75));
draw(shift(0,-2)*line,Arrow(20bp,40,.75,filltype=NoFill));

position pos=BeginPoint;
pos.position=.75;
draw(shift(0,-4)*line,BeginArrow(20bp,pos));
draw(shift(0,-6)*line,BeginArrow(20bp,40,pos,filltype=NoFill));

Étiquettes : , , ,


Asymptote Generalities – fig0440

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

Figure 0044
(Compiled with Asymptote version 2.14svn-r5318)
    
unitsize(5cm);

path g=(0,0)--(1,0);
draw(g,Arrow(Relative(0.45)));
add(arrow(g,Relative(0.55)));

Étiquettes : ,


Asymptote Generalities – fig0450

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

Figure 0045
(Compiled with Asymptote version 2.14svn-r5318)
    
size(5cm,0);
path g = (0,0)--(1,0);
draw(g,Arrow(Relative(0.75)));
add(arrow(reverse(g), invisible, FillDraw(green,red), Relative(0.75)));

Étiquettes : , ,


Asymptote Generalities – fig0460

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

Figure 0046
(Compiled with Asymptote version 2.14svn-r5318)
    
size(5cm,0);
path line=(0,0)--(5,0);
transform T=shift(0,-1);

draw(line, Bar);
draw(T*line, BeginBar);
draw(T^2*line, Bars);
draw(T^3*line, Arrow, BeginBar);


Étiquettes : , ,


Asymptote Generalities – fig0470

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

Figure 0047
(Compiled with Asymptote version 2.14svn-r5318)
    
path line=(0,0)--(5cm,0);
transform T=shift(0,-cm);

draw(line,linewidth(1mm),Bars);
draw(T^2*line,Bars(5mm));
draw(T^3*line,linewidth(1mm),Bars(5mm));
draw(T^4*line,dotted+red,Bars);

Étiquettes : , ,


Asymptote Generalities – fig0480

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

Figure 0048
(Compiled with Asymptote version 2.14svn-r5318)
    
size(4cm,0);

draw((-.5,0)--(1,0));
draw((0,-.5)--(0,1));
draw((0,0)--(.75,0),linewidth(1mm),Arrow(3mm));
draw((0,0)--(0,.75),linewidth(1mm),Arrow(3mm));

Étiquettes : ,


Asymptote Generalities – fig0880

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

Figure 0088
(Compiled with Asymptote version 2.14svn-r5318)
    
size(0,0);
pair A=(0,0), B=(4cm,0);
path line=A--B;
transform TD=shift(0,-cm);
transform TR=shift(2.5cm,0);

defaultpen(linewidth(3bp));

draw("$AB$",line,.8red,Arrows(3mm));  
draw("$A$",A,N); draw("$B$",B,N);

draw("$AB$",TD*line,.8red,Arrows(3mm),PenMargins);  
draw("$A$",TD*A,N); draw("$B$",TD*B,N);

draw("$AB$",TD^2*line,.8red,Arrows(3mm),DotMargins);  
dot("$A$",TD^2*A,dotfactor*NW); dot("$B$",TD^2*B,dotfactor*NE);

margin BigMargins=Margin(2,2);
draw("$AB$",TD^3*line,.8red,Arrows(3mm),BigMargins);  
draw("$A$",TD^3*A,N); draw("$B$",TD^3*B,N);


Étiquettes : , , , , ,


Asymptote Generalities – fig0890

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

Figure 0089
(Compiled with Asymptote version 2.14svn-r5318)
    
//From documentation of Asymptote
size(6cm,0); 

void distance(picture pic=currentpicture, pair A, pair B, Label L="", real n=0, pen p=currentpen) 
{
  real d=3mm;
  guide g=A--B;
  transform T=shift(-n*d*unit(B-A)*I);
  pic.add(new void(frame f, transform t) {
    picture opic;
    guide G=T*t*g;
    draw(opic,G,p,Arrows(NoFill),Bars,PenMargins); 
    label(opic,L,midpoint(G),UnFill(1)); 
    add(f,opic.fit());
  });
  pic.addBox(min(g),max(g),T*min(p),T*max(p));
} 
 
pair A=(0,0), B=(3,3);
 
dot(A); 
dot(B); 
distance(A,B,rotate(dir(A--B))*Label("$\ell$"),1); 

Étiquettes : , , , ,


Asymptote Generalities – fig0910

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

Figure 0091
(Compiled with Asymptote version 2.14svn-r5318)
    
size(0,0);
pair A=0;
dot(A);
arrow("1",A,NE,2cm);
arrow("2",A,SE,1cm);
arrow("3",A,SW,1.5cm,Margin(3,0));
arrow("4",A,NW,1.5cm,N);

Étiquettes : , ,


Asymptote using geometry.asy – fig0980

Category: Asymptote,Examples 2D,geometry.asyPh. Ivaldi @ 7 h 02 min

Figure 0098
(Compiled with Asymptote version 2.14svn-r5318)
    
import geometry;
size(6cm,0);

// currentcoordsys=cartesiansystem((1,2),i=(1,0.5),j=(-0.5,.75));
// show(currentcoordsys, xpen=invisible);

point A=(-1,1);
dot("$A$",A,S);

arc a=arc(circle(A,2), 45, 270);
draw(a,linewidth(3mm),ArcArrow(5mm));

/* View the definition of arc arc(explicit arc,abscissa,abscissa) */
draw(arc(a,angabscissa(135),angabscissa(225)),1mm+red,ArcArrow(3mm),TrueMargin(0,0.5mm));

Étiquettes : , , , ,


Asymptote using geometry.asy – fig0990

Category: Asymptote,Examples 2D,geometry.asyPh. Ivaldi @ 8 h 02 min

Figure 0099
(Compiled with Asymptote version 2.14svn-r5318)
    
import geometry;
size(6cm,0);

// currentcoordsys=cartesiansystem((1,2),i=(1,0.5),j=(-0.5,.75));
// show(currentcoordsys, xpen=invisible);

point A=(-1,1);
dot("$A$",A,S);

arc a=arc(ellipse(A,2,1,45), 45, 270, fromCenter);
draw(a,linewidth(3mm),ArcArrow(5mm));

/* View the definition of arc arc(explicit arc,abscissa,abscissa) */
draw(arc(a,angabscissa(135),angabscissa(225)),1mm+red,ArcArrow(3mm),TrueMargin(0,0.5mm));

Étiquettes : , , , ,


Asymptote using geometry.asy – fig1000

Category: Asymptote,Examples 2D,geometry.asyPh. Ivaldi @ 9 h 02 min

Figure 0100
(Compiled with Asymptote version 2.14svn-r5318)
    
import geometry;
size(6cm,0);

currentcoordsys=cartesiansystem((1,2),i=(1,0.5),j=(-0.5,.75));
show(currentcoordsys, xpen=invisible);

point A=(-1,1);
point B=(2,2);
point M=(1,3);

/* View the definition of arc arccircle(point,point,point) */
arc AMB=arccircle(A,M,B);
draw(AMB,linewidth(3mm),Arrow(5mm),TrueMargin(0,0.5mm));
dot("$C$",AMB.el.C);
draw(arccircle(A,B,M),1mm+red,Arrow(3mm));

dot("$A$",A,2SW,blue);
dot("$B$",B,2E,blue);
dot("$M$",M,2N,blue);

Étiquettes : , , , , ,


Unofficial package arrows_pi.asy – fig0010

Category: arrows_pi.asy,Asymptote,Unofficial packagesPh. Ivaldi @ 7 h 32 min

Figure 0001
(Compiled with Asymptote version 2.14svn-r5318)
    
size(8cm,0);
import arrows_pi;

transform T=shift(0,-0.125);
path g=(0,0)--(1,0);
int i=-1;

draw(T^(++i)*g, EdgeArrows());
draw(T^(++i)*g, 0.8*green, EdgeArrows(EdgeSimpleHead));
draw(T^(++i)*g, 0.8*red, EdgeArrows(EdgeSimpleHead,size=5mm));

draw(T^(++i)*g, EdgeArrows(EdgeHookHead));
draw(T^(++i)*g, 0.8*green, EdgeArrows(EdgeHookHead,size=5mm));
draw(T^(++i)*g, 0.8*red, EdgeArrows(EdgeHookHead(barb=20),size=5mm));
draw(T^(++i)*g, 0.8*blue, EdgeArrows(EdgeHookHead(dir=60),size=5mm));

Étiquettes :


Unofficial package arrows_pi.asy – fig0020

Category: arrows_pi.asy,Asymptote,Unofficial packagesPh. Ivaldi @ 8 h 32 min

Figure 0002
(Compiled with Asymptote version 2.14svn-r5318)
    
size(8cm,0);
import arrows_pi;

real i=0;
draw((0,0)--(1,0), EdgeArrows());
draw((1,.25)--(0,.25), EdgeArrows, p=green);
draw((0,0.5)--(1,0.5), EdgeArrows(Relative(.75), space=4bp), p=orange);
draw((1,0.75)--(0,0.75), EdgeArrows(Relative(.75), space=4bp), p=grey);
draw((1,1)--(0,1), EdgeArrows(Relative(.25), space=4bp), p=Magenta);
draw((0,1.25)--(1,1.25), EdgeArrows(space=2mm), p=1mm+deepcyan);
draw((0,1.5)..(.5,1.75)..(1,1.5), EdgeArrows(size=5mm), p=purple);

draw((0.5,0)--(.5,1), EdgeArrows(), p=red);
draw((0,0)--(1,1), EdgeArrows(size=5mm,NoFill,position=Relative(.85)), p=blue);

Étiquettes :


Unofficial package arrows_pi.asy – fig0030

Category: arrows_pi.asy,Asymptote,Unofficial packagesPh. Ivaldi @ 9 h 32 min

Figure 0003
(Compiled with Asymptote version 2.14svn-r5318)
    
size(8cm,0);
import arrows_pi;
EdgeHead=EdgeHookHead();

real i=0;
draw((0,0)--(1,0), EdgeArrows());
draw((1,.25)--(0,.25), EdgeArrows, p=green);
draw((0,0.5)--(1,0.5), EdgeArrows(Relative(.75), space=4bp), p=orange);
draw((1,0.75)--(0,0.75), EdgeArrows(Relative(.75), space=4bp), p=grey);
draw((1,1)--(0,1), EdgeArrows(Relative(.25), space=4bp), p=Magenta);
draw((0,1.25)--(1,1.25), EdgeArrows(space=2mm), p=1mm+deepcyan);
draw((0,1.5)..(.5,1.75)..(1,1.5), EdgeArrows(size=5mm), p=purple);

draw((0.5,0)--(.5,1), EdgeArrows(), p=red);
draw((0,0)--(1,1), EdgeArrows(size=5mm,NoFill,position=Relative(.85)), p=blue);

Étiquettes :


Unofficial package arrows_pi.asy – fig0040

Category: arrows_pi.asy,Asymptote,Unofficial packagesPh. Ivaldi @ 10 h 32 min

Figure 0004
(Compiled with Asymptote version 2.14svn-r5318)
    
size(8cm,0);
import arrows_pi;
EdgeHead=EdgeSimpleHead();

real i=0;
draw((0,0)--(1,0), EdgeArrows());
draw((1,.25)--(0,.25), EdgeArrows, p=green);
draw((0,0.5)--(1,0.5), EdgeArrows(Relative(.75), space=4bp), p=orange);
draw((1,0.75)--(0,0.75), EdgeArrows(Relative(.75), space=4bp), p=grey);
draw((1,1)--(0,1), EdgeArrows(Relative(.25), space=4bp), p=Magenta);
draw((0,1.25)--(1,1.25), EdgeArrows(space=2mm), p=1mm+deepcyan);
draw((0,1.5)..(.5,1.75)..(1,1.5), EdgeArrows(size=5mm), p=purple);

draw((0.5,0)--(.5,1), EdgeArrows(), p=red);
draw((0,0)--(1,1), EdgeArrows(size=5mm,position=Relative(.85)), p=blue);

Étiquettes :


Official Asymptote example – integraltest

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

Figure 0100
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
import graph;
size(300,150,IgnoreAspect);

real f(real x) {return 1/x^(1.1);}
pair F(real x) {return (x,f(x));}

dotfactor=7;

void subinterval(real a, real b)
{
  path g=box((a,0),(b,f(b)));
  filldraw(g,lightgray); 
  draw(box((a,f(a)),(b,0)));
}

int a=1, b=9;
  
xaxis("$x$",0,b); 
yaxis("$y$",0); 
 
draw(graph(f,a,b,operator ..),red);
 
int n=2;

for(int i=a; i <= b; ++i) {
  if(i < b) subinterval(i,i+1);
  if(i <= n) labelx(i);
  dot(F(i));
}

int i=n;
labelx("$\ldots$",++i);
labelx("$k$",++i);
labelx("$k+1$",++i);
labelx("$\ldots$",++i);

arrow("$f(x)$",F(i-1.5),NE,1.5cm,red,Margin(0,0.5));


Étiquettes : ,


Official Asymptote example – lever

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

Figure 0120
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
size(200,0);

pair z0=(0,0);
pair z1=(2,0);
pair z2=(5,0);
pair zf=z1+0.75*(z2-z1);

draw(z1--z2);
dot(z1,red+0.15cm);
dot(z2,darkgreen+0.3cm);
label("$m$",z1,1.2N,red);
label("$M$",z2,1.5N,darkgreen);
label("$\hat{\ }$",zf,0.2*S,fontsize(24pt)+blue);

pair s=-0.2*I;
draw("$x$",z0+s--z1+s,N,red,Arrows,Bars,PenMargins);

s=-0.5*I;
draw("$\bar{x}$",z0+s--zf+s,blue,Arrows,Bars,PenMargins);

s=-0.95*I;
draw("$X$",z0+s--z2+s,darkgreen,Arrows,Bars,PenMargins);


Étiquettes : , , ,


Official Asymptote example – unitcircle

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

Figure 0248
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
size(0,150);

pair z0=0;
pair z1=1;
real theta=30;
pair z=dir(theta);

draw(circle(z0,1));
filldraw(z0--arc(z0,1,0,theta)--cycle,lightgrey);
dot(z0);
dot(Label,z1);
dot("$(x,y)=(\cos\theta,\sin\theta)$",z);
arrow("area $\frac{\theta}{2}$",dir(0.5*theta),2E);
draw("$\theta$",arc(z0,0.7,0,theta),LeftSide,Arrow,PenMargin);

Étiquettes : , , , , ,


Official Asymptote example – upint

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

Figure 0226
(Compiled with Asymptote version 1.87svn-r4652)
/* This code comes from The Official Asymptote Gallery */
    
import graph;
import lowupint;

size(100,0);

real a=-0.8, b=1.2;
real c=-1.0/sqrt(3.0);

partition(a,b,c,max);

arrow("$f(x)$",F(0.5*(a+b)),NNE,red);
label("$\cal{U}$",(0.5*(a+b),f(0.5*(a+b))/2));


Étiquettes : ,