Asymptote Generalities – fig0810

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

Figure 0081
(Compiled with Asymptote version 2.14svn-r5318)
    
size(4cm,0);
pair A=0, B=(1,0), C=(2,2);;

draw(A--B--C--cycle);
dot("$A$",A,dir(C--A,B--A));  
dot("$B$",B,dir(C--B,A--B));  
dot("$C$",C,dir(A--C,B--C));

Étiquettes : , ,


Asymptote Generalities – fig0820

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

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

draw("$A$",line);  
draw("$B$",T*line,dir(0));
draw("$C$",T^2*line,N);
draw(Label("$D$",fontsize(14pt)),T^3*line);

Étiquettes : , , , ,


Asymptote Generalities – fig0830

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

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

draw(Label("A",align=Center,filltype=UnFill), line);
draw(Label("B",UnFill), T*line, Center);
draw(Label("C",align=Center,position=Relative(.75),UnFill), T^2*line);
draw(Label("D",position=Relative(.25),UnFill), align=Center, T^3*line);

Étiquettes : , , , , ,


Asymptote Generalities – fig0840

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

Figure 0084
(Compiled with Asymptote version 2.14svn-r5318)
    
pair c=0;
label("abc xyz ijk",c,Align,basealign);
label("abc xyz ijk",c,Align,red);
draw(c--(c+(2cm,0))); // This is the baseline.

shipout((scale(3)*currentpicture.fit()));

Étiquettes : , , , ,


Asymptote Generalities – fig0850

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

Figure 0085
(Compiled with Asymptote version 2.14svn-r5318)
    
size(3cm,0);
pair A=0, B=(1,0), C=(1,1);

draw("$1$",A--B);
draw("$1$",B--C);
draw("$\sqrt{2}$",C--A);

Étiquettes : , , ,


Asymptote Generalities – fig0860

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

Figure 0086
(Compiled with Asymptote version 2.14svn-r5318)
    
size(3cm,0);
pair A=0, B=(1,0), C=(1,1);

draw("$1$",A--B);
draw("$1$",B--C);

// draw(rotate(dir(C--A))*"$\sqrt{2}$",C--A);
draw(Label("$\sqrt{2}$",Rotate(-dir(C--A))),C--A);

Étiquettes : , , , , , ,


Asymptote Generalities – fig0870

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

Figure 0087
(Compiled with Asymptote version 2.14svn-r5318)
    
size(3cm,0);
path g=(1,1)--(3,2);
draw(Label("a text",Rotate(dir(g))), g);
draw(Label("a text",red,Rotate(-dir(g)),align=I*dir(g)), g);

É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 – fig0900

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

Figure 0090
(Compiled with Asymptote version 2.14svn-r5318)
    
// Author: John Bowman
size(0,100);
real margin=2mm;
pair z1=(0,1);
pair z0=(0,0);

object label1=draw("small box",box,z1,margin);
object label0=draw("LARGE ELLIPSE",ellipse,z0,margin);

add(new void(frame f, transform t) {
    draw(f,point(label1,S,t)--point(label0,N,t));
  });

Étiquettes : , ,