![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
Compétitivité-Qualité-Fiabilité-Disponibilité
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm,0); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm,0); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm,0.5cm); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm,0.5cm); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm, 0.5cm, false); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm, 3cm, false); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair A, B, C, D; A=(0,0); B=(2cm,0); C=(4cm,0); D=(4cm,2cm); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
unitsize(1cm); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
unitsize(x=1cm, y=0.5cm); pair A, B, C, D; A=(0,0); B=(2,0); C=(4,0); D=(4,2); draw(A--B); draw(C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm,1cm); pair A=(0,0), B=(1,0), C=(0,1); draw (A--B--C);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm,1cm); pair A=(0,0), B=(1,0), C=(0,1); draw (A--B--C--cycle);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(1cm,1cm); pair [] A; A[0]=(-1, -1); A[1]=( 1, -1); A[2]=( 1, 1); A[3]=(-1, 1); draw (A[0]--A[1]--A[2]--A[3]--cycle); draw (A[0]--A[2]); draw (A[1]--A[3]);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,2cm); draw(unitsquare); dot((0,0)--(1,1)--(0,1)--(1,0)); draw((0,0)--(1,1)); draw((1,0)--(0,1));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,2cm,false); draw(unitsquare); dot((0,0)--(1,1)--(0,1)--(1,0)); draw((0,0)--(1,1)); draw((1,0)--(0,1));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
unitsize(cm); pair A=(0,0), B=(1,0), C=(0,1); path trig; trig=A--B--C--cycle; draw(trig); dot(trig,linewidth(4bp)); dot(shift(3,0)*trig,red+4bp);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,2cm); pair A, B, C; A=(0,0); B=(1,0); C=(0,1); draw(A--B--C--cycle); draw (midpoint(A--B) -- C); draw (B+0.5*(C-B) -- A); draw (interp(A,C,0.5) -- B);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,2cm); pair A, B, C; A=(0,0); B=(1,0); C=(0,1); draw(A--B--C--cycle); draw (midpoint(A--B) -- C); draw (B+0.5*(C-B) -- A); draw (interp(A,C,0.5) -- B); dot(A/3 + B/3 + C/3);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,0); pair A=(0,0), B=(1,0), C=(0,1); draw(A--B--C--cycle); draw(A--B,linewidth(4bp));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,0); pair A=(0,0), B=(1,0), C=(0,1); draw(A--B--C--cycle); draw(A--B,(red+green));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(2cm,0); pair A=(0,0), B=(1,0), C=(0,1); draw(A--B,.8white+6bp); draw(A--C,.6white+6bp); draw(B--C,.4white+6bp); draw(A--B--C--cycle,yellow);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); path p1=(0,0)--(1,1); path p2=(2,0)--(3,1); draw(p1,linewidth(5mm)); draw(p2,linewidth(5mm)); draw(p1--p2,3mm+.8blue); draw(reverse(p1)--p2,1mm+.8red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
unitsize(1cm); path line=(0,0)--(6,0); pen my_pen=linetype("24 8 8 8"); draw(line,linetype("24 8 8 8")); draw(shift(0,-1)*line,my_pen+.8red); draw(shift(0,-2)*line,my_pen+.7green+4bp); draw(shift(0,-3)*line,linetype("24 8 8 8",false)+.7blue+4bp); draw(shift(0,-4)*line,linetype("24 8 8 8",true,false)+4bp); draw(shift(0,-5)*line,linetype("24 8 8 8",false,false)+.5red+blue+4bp);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
fill((0,0)--(0,2cm)--(2cm,0)--cycle,gray);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
filldraw((0,0)--(0,2cm)--(2cm,0)--cycle,gray);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
filldraw((0,0)--(0,2cm)--(2cm,0)--cycle,fillpen=gray,drawpen=linewidth(1mm)+.8red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm,0); pair A, B, C, D; A=(0,0); B=(1,0); C=(1,1); D=(0,1); fill(A--C--B--D--cycle,grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm,0); pair A, B, C, D; A=(0,0); B=(1,0); C=(1,1); D=(0,1); filldraw(A--C--B--D--cycle,grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); path cle=unitcircle; draw((-1.5,0)--(2.5,0),linewidth(10mm)); filldraw(cle,red+opacity(.5)); filldraw(shift((1,0))*cle,blue+opacity(.5)); shipout(format="pdf"); /*Others examples here.*/
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair O=0; dot("N",O,N); dot("S",O,S); dot("E",O,E); dot("W",O,W);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair O=0; labelmargin=2; dot("N",O,N); dot("S",O,S); dot("E",O,E); dot("W",O,W);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); pair O=0; dot("N",O,10N); draw("S",O,10S); draw("E",O,10E); draw("W",O,10W); draw("NE",O,5NE); draw("SE",O,5SE); draw("NW",O,5NW); draw("SW",O,5SW);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair O=0; draw(scale(2)*Label("N",.8red),O,10*N,linewidth(3mm)); draw(scale(2)*Label("S",.8red),O,10*S); draw(scale(2)*Label("E",.8red),O,10*E); draw(scale(2)*Label("W",.8red),O,10*W); draw(rotate(45)*Label("NE"),O,5NE); draw(rotate(-45)*Label("SE"),O,5SE); draw(rotate(-45)*Label("NW"),O,5NW); draw(rotate(45)*Label("SW"),O,5SW);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
pair O=0; dot(O); label("$\frac{\pi^2}{2}$",O);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
dot(Label("$\frac{\pi^2}{2}$",(0,0),align=E));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
label(scale(10)*Label("$\pi$"),(0,0));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
texpreamble("\usepackage{manfnt}"); label(scale(3)*Label("\textdbend"),(0,0));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
dot(Label("$A$"),(0,0),S);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,4cm); dot(Label("$A$"),(0,0),S); draw(E--W,invisible); draw(N--S,invisible); shipout(bbox());
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
dot(Label("$A$",fontsize(20pt)),(0,0),NE);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
defaultpen(fontsize(20pt)); dot(Label("$A$"),(0,0),NE); dot(Label("$B$"),(2cm,0),NE+N);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
label(rotate(45)*"\textbf{Hello}");
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(3cm,0); path line1=(0,0)--(1,0); path line2=(0,0)--(1,1); pair bissec=dir(line1,line2); draw(line1); draw(line2); dot(bissec,linewidth(3bp)); draw(-.5bissec--bissec,dotted); dot("$A$",(0,0),-bissec);
![]() |
|
(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));
![]() |
|
(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);
![]() |
|
(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);
![]() |
|
(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);
![]() |
|
(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);
![]() |
|
(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);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); draw(E--N--W--S--cycle,.5red+1mm); draw(E..N..W..S..cycle); dot(E..N..W..S..cycle,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair O=0; draw(circle(O,2cm)); dot(circle(O,2cm),red+4bp);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm); draw(unitcircle, dot); dotfactor*=3; draw(shift(-0.5,-0.5)*unitsquare, dot(blue,Fill(red)));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); real R=2cm; draw(scale(R)*unitcircle); dot((0,0),linewidth(4bp)); dot((R*cos(pi/6),R*sin(pi/6)),red+8bp);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); import graph; path PerfectCircle=Circle((0,0),1); draw(PerfectCircle,linewidth(2mm)); dot(PerfectCircle,.8red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); //Return Circle AB diameter path circle(pair A, pair B) { return shift(midpoint(A--B))*scale(abs(A-B)/2)*unitcircle; } pair A=(0,0), B=(1,0); draw(circle(A,B)); dot(A--B);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); //Return Circle AB diameter path circle(pair A, pair B) { return shift(midpoint(A--B))*scale(abs(A-B)/2)*unitcircle; } pair A=(0,0), B=(3,0), C=(2,1); draw(A--B,.8blue); draw(A--C,.8red); draw(B--C,.8green); draw(circle(A,B),.8blue); draw(circle(A,C),.8red); draw(circle(B,C),.8green);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); //Return Circle AB diameter path circle(pair A, pair B) { return shift(midpoint(A--B))*scale(abs(A-B)/2)*unitcircle; } pair A=(0,0), B=(1,0), C=(2,0); path cleAB=circle(A,B); path cleAC=circle(A,C); for(real t=0; t<length(cleAB); t+=0.01) fill(circle(point(cleAB,t),point(cleAC,t)));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair O=0; defaultpen(linewidth(2mm)); draw(arc(O,2cm,0,60),.8red,BeginPenMargin); draw(arc(O,2cm,60,120),.7green,PenMargins); draw(arc(O,-2cm,0,120),.7blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); real a=360/6; for (int i = -1; i < 5; ++i) fill(arc((0,0),1,i*a,(i+1)*a)--cycle,grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); real n=7, a=360/n; for (int i = 0; i < n; ++i) filldraw((0,0)--arc((0,0),1,i*a,(i+1)*a)--cycle, i/n*blue + (1-i/n)*green + grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); real a=360/6; for (int i = -1; i < 5; ++i) draw(Label(format("%i",i+1)),arc((0,0),10,i*a,(i+1)*a)--cycle,grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair x=0; pair y=(-6.5cm,0); label(format(6.66666), x, E); label("format(6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%f$", 6.66666), x, E); label("format(\"\$x=\%f\$\", 6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%.1f$", 6.66666), x, E); label("format(\"\$x=\%.1f\$\", 6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%.2f$", 6.66666), x, E); label("format(\"\$x=\%.2f\$\", 6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%.0f$", 6.66666), x, E); label("format(\"\$x=\%.0f\$\", 6.6666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%07.3f$", 6.66666), x, E); label("format(\"\$x=\%07.3f\$\", 6.6666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%7.3f$", 6.66666), x, E); label("format(\"\$x=\% 7.3f\$\", 6.6666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%g$", 66.666), x, E); label("format(\"\$x=\%g\$\", 66.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%g$", 666666.666), x, E); label("format(\"\$x=\%g\$\", 666666.666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%g$", 666666666.666), x, E); label("format(\"\$x=\%g\$\", 666666666.666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%e$", 666666.666), x, E); label("format(\"\$x=\%e\$\", 666666.666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%.2e$", 666666.666), x, E); label("format(\"\$x=\%.2e\$\", 666666.666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%i$", 6), x, E); label("format(\"\$x=\%i\$\", 6)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%f$", 6.0), x, E); label("format(\"\$x=\%f\$\", 6.0)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%+.2f$", 6.66666), x, E); label("format(\"\$x=\%+.2f\$\", 6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=%+.2f$", -6.66666), x, E); label("format(\"\$x=\%+.2f\$\", -6.66666)", y, E); x+=(0,-1cm);y+=(0,-1cm); label(format("$x=% .2f$", 6.666666), x, E); label("format(\"\$x=\% .2f\$\", 6.666666)", y, E);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
// This file was compiled with this unix command: LC_NUMERIC="french" asy size(0,0); texpreamble("\usepackage[frenchb]{babel}"); pair x=0; x+=(0,-1cm); label(format("$x=%f$", 666666.666), x, E); x+=(0,-1cm); label(format("$x=%f$", pi), x, E); x+=(0,-1cm); label(format("$x=\nombre{%f}$", 666666.666), x, E); x+=(0,-1cm); label(format("$x=\nombre{%f}$", pi), x, E);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A, B, C; A=(0,0); B=(3cm,0); C=(0,3cm); draw(A--B--C--cycle); filldraw(shift(A)*scale(4bp)*unitcircle, white); filldraw(shift(B)*scale(4bp)*unitcircle, white); filldraw(shift(C)*scale(4bp)*unitcircle, white);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); pair A=(0,0), B=(0,1), C=(1,0), D=(1,1); draw(A..B..C..D); dot(A);dot(B);dot(C);dot(D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); import roundedpath; pair A=(0,0), B=(0,1), C=(1,0), D=(1,1); draw(roundedpath(A--B--C--D,.5)); dot(A--B--C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); pair A=(0,0), B=(0,1), C=(1,0), D=(1,1); draw(A--B..C..D); dot(A--B--C--D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); pair A=(0,0), B=(0,1), C=(1,0), D=(1,1); draw(A..B..C..D--cycle); dot(A);dot(B);dot(C);dot(D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); pair A=(0,0), B=(0,1), C=(1,0), D=(1,1); draw(A---B..C..D); dot(A);dot(B);dot(C);dot(D);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); import roundedpath; draw(roundedpath(unitsquare,.4)); dot(roundedpath(unitsquare,.4),red); draw(unitsquare); dot(unitsquare);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(4cm,0); draw(A{N}..B); dot(A{N}..B);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(4cm,0); draw(A{N}..B{E}); dot(A{N}..B{E});
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(4cm,0); draw(A{dir(90)}..B{dir(0)}); dot(A{dir(90)}..B{dir(0)});
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(4cm,0); draw(A{N}..B{N}); dot(A{N}..B{N});
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(4cm,0); draw(A{N}..B{N}..cycle); dot(A{N}..B{N}..cycle);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
//From documentation of Asymptote size(0,6cm); guide center = (0,1){W}..tension 0.8..(0,0){(1,-.5)}..tension 0.8..{W}(0,-1); draw((0,1)..(-1,0)..(0,-1)); filldraw(center{E}..{N}(1,0)..{W}cycle); unfill(circle((0,0.5),0.125)); fill(circle((0,-0.5),0.125));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(2cm,2cm), C=(4cm,0); draw(A..B..C); draw(A{curl 0}..B..{curl 0}C,red); dot(A--B--C);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(2cm,2cm), C=(4cm,0); draw(A..B..C,linewidth(3mm)); draw(A{curl 1}..B..{curl 1}C,2mm+.8red); dot(A--B--C);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(3cm,4cm), C=(6cm,0); draw(A..B..C); draw(A{curl 0}..B..{curl 0}C,1mm+red+grey); draw(A{curl 5}..B..{curl 0}C,1mm+green+grey); draw(A{curl 10}..B..{curl 0}C,1mm+blue+grey); draw(A{curl 10}..B..{curl 10}C,1mm+yellow+grey); dot(A--B--C);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(3cm,5cm), C=(6cm,0); defaultpen(1mm); draw(A..B..C); draw(A.. tension .75 ..B.. tension .75 ..C,grey); draw(A.. tension 1.5 ..B.. tension 1.5 ..C,.8red); draw(A.. tension 2 ..B.. tension 2 ..C,green+grey); draw(A.. tension 10 ..B.. tension 10 ..C,blue+grey); dot(A--B--C,linewidth(6bp));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(3cm,5cm), C=(6cm,0); defaultpen(1mm); draw(A..B..C); draw(A.. tension 10 and 1 ..B.. tension 1 and 10 ..C,grey); draw(A.. tension 1 and 10 ..B.. tension 10 and 1 ..C,.8red); draw(A.. tension 2 and 1 ..B.. tension 1 and 2 ..C,blue+grey); dot(A--B--C,linewidth(6bp));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(3cm,5cm), C=(6cm,0); pair ctrl_rgt_A, ctrl_lft_B, ctrl_rgt_B, ctrl_lft_C; ctrl_rgt_A=A+2cm*E; ctrl_lft_B=B+3cm*W; ctrl_rgt_B=B+3cm*E; ctrl_lft_C=C+2cm*W; draw(A..B..C); draw(A.. controls ctrl_rgt_A and ctrl_lft_B ..B.. controls ctrl_rgt_B and ctrl_lft_C ..C,1mm+grey); dot(A--B--C,linewidth(6bp)); draw((A--ctrl_rgt_A),Arrow, p=grey); draw((B--ctrl_rgt_B),Arrow, p=grey); draw((B--ctrl_lft_B),Arrow, p=grey); draw((C--ctrl_lft_C),Arrow, p=grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair A=0, B=(3cm,5cm), C=(6cm,0); pair ctrl_rgt_A, ctrl_lft_B, ctrl_rgt_B, ctrl_lft_C; ctrl_rgt_A=A+2cm*NE; ctrl_lft_B=B+5cm*SW; ctrl_rgt_B=B+2cm*SE; ctrl_lft_C=C+5cm*NW; draw(A..B..C); draw(A.. controls ctrl_rgt_A and ctrl_lft_B ..B.. controls ctrl_rgt_B and ctrl_lft_C ..C,1mm+grey); dot(A--B--C,linewidth(6bp)); draw((A--ctrl_rgt_A),Arrow, p=grey); draw((B--ctrl_rgt_B),Arrow, p=grey); draw((B--ctrl_lft_B),Arrow, p=grey); draw((C--ctrl_lft_C),Arrow, p=grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(8cm); path p1 = (0,0){up}..(5,4)..(10,0){down}; pair post0=postcontrol(p1,0); pair pre1=precontrol(p1,1); pair post1=postcontrol(p1,1); pair pre2=precontrol(p1,2); dot(post0^^pre1^^post1^^pre2); path p2 = (0,0)..controls post0 and pre1..(5,4)..controls post1 and pre2..(10,0); draw(p1,2mm+red); draw(p2,linewidth(1mm));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path pt1=scale(2cm)*unitcircle; path pt2=scale(1cm)*unitcircle; draw(pt1^^pt2); dot(pt1^^pt2);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path cle=scale(2cm)*unitcircle; draw(cle); for(real i=0; i<=length(cle); i+=.2) { dot(point(cle,i)); draw((0,0)--point(cle,i),dotted); }
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(8cm,0); pair O=(0,0); path p=(0,0){dir(0)}..{dir(45)}(2,2){dir(-45)}..{dir(0)}(4,0); pair En1=dir(p, 1, -1); pair En2=dir(p, 2, -1); draw(p); draw(Label("dir(p,1,-1)", EndPoint), point(p,1)--point(p,1)+En1, red, Arrow); draw(Label("dir(p,2,-1)", EndPoint), point(p,2)--point(p,2)+En2, red, Arrow); pair Ep0=dir(p, 0, 1); pair Ep1=dir(p, 1, 1); draw(Label("dir(p,0,1)", EndPoint), point(p,0)--point(p,0)+Ep0, blue, Arrow); draw(Label("dir(p,1,1)", EndPoint, E), point(p,1)--point(p,1)+Ep1, blue, Arrow); draw(p, dot);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); path curv=reverse((0,2){dir(10)}..(1,0)..{dir(-50)}(3,2)); guide dirc; draw(curv,linewidth(1mm)+grey); for(real i=0; i<=length(curv); i+=.005) { draw(point(curv,i)--dir(curv,i)+point(curv,i),grey+yellow); dirc=dirc..dir(curv,i)+point(curv,i); } draw(dirc,grey);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
// Author: John Bowman pair[] z=new pair[10]; z[0]=(0,100); z[1]=(50,0); z[2]=(180,0); for(int n=3; n <= 9; ++n) z[n]=z[n-3]+(200,0); path p=z[0]..z[1]---z[2]---z[3] &z[3]..z[4]--z[5]::{up}z[6] &z[6]::z[7]---z[8]..{up}z[9]; defaultpen(linewidth(1)); draw(p, grey); dot(p); real len=50; for(int i = 0; i < z.length; ++i) { pair z=point(p,i); draw(z--z+len*dir(p,i,-1),red); draw(z--z+len*dir(p,i,1),blue+dashed); draw(z-len*dir(p,i)--z+len*dir(p,i),green+Dotted(defaultpen())); }
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); import math; path cle=unitcircle; path curv=reverse((1.5,2){dir(-60)}..(2.5,0)..{dir(60)}(3.5,2)); draw(cle); draw(curv); pair pt_cle=point(cle, 1.35); pair pt_dir_cle=dir(cle, 1.35); drawline((pt_cle - pt_dir_cle), (pt_cle + pt_dir_cle), red); pair pt_curv=point(curv, dirtime(curv, pt_dir_cle)); drawline((pt_curv - pt_dir_cle), (pt_curv + pt_dir_cle), blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); pair O=(2cm,2cm); path cle=shift(O)*scale(2cm)*unitcircle; pair M=point(cle,.6); dot("$O$",O,SW); dot("$M$",M,unit(M-O)); draw(cle); draw((0,0)--(0,4cm),Arrow); draw((0,0)--(4cm,0),Arrow); draw(Label("$X_M$",position=EndPoint),M--(xpart(M),0),dotted); draw(Label("$Y_M$",position=EndPoint),M--(0,ypart(M)),dotted);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path p= scale(1cm)*unitcircle; draw(p,red+1mm); draw(shift(1mm,2mm)*p); draw(shift(2*(1mm,2mm))*p); draw(shift(3*(1mm,2mm))*p); draw(shift(4*(1mm,2mm))*p); draw(shift(5*(1mm,2mm))*p);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path p= (5mm,-5mm){right} .. (2cm,0); for(int i=10; i<360; i+=10) draw(rotate(i)*p); draw(p,red+1mm);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); path p= (1,-1){right} .. (4,0); pair O=(3,.25); for(int i=10; i<360; i+=10) draw(rotate(i,O)*p); dot(O,blue); draw(p,red+1mm);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); path cle=unitcircle; draw(cle,red); draw(xscale(2)*cle); draw(yscale(2)*cle); draw(scale(2)*cle,blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(8cm,0); transform scale(pair center, real k) { return shift(center)*scale(k)*shift(-center); } path cle=unitcircle; pair A=(4,0); draw(cle); draw(scale(A,.5)*cle,red); draw(scale(A,-.75)*cle,blue); for (real t; t<length(cle); t+=1) draw(point(cle,t)--point(scale(A,-.75)*cle,t),dotted); dot("$A$",A,N);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,4cm); texpreamble("\usepackage{amsmath} \DeclareMathOperator{\e}{e}"); pair A=2*expi(pi/3); draw((0,-2)--(0,2.5)); draw((0,0)--(1,0),linewidth(1mm),Arrow(2mm)); draw((0,0)--(3.5,0)); draw((0,0)--(0,1),linewidth(1mm),Arrow(2mm)); dot(Label("$A(z_a=2\e^{i\frac{\pi}{3}})$"),A,NE); label(format("$\vert z_a\vert=%.1f$",length(A)),(.5,-1),E); label(format("$\arg(z_a)\simeq%.4f$",angle(A)),(.5,-2),E);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); texpreamble("\usepackage{amsmath} \DeclareMathOperator{\e}{e}"); pair A=2*expi(pi/3); pair B=expi(pi/6); pair C=A*B; pair D=C-B; pair Bp=2*B; pair E=I*D; draw((0,-2)--(0,2.5)); draw((0,0)--(1,0),linewidth(1mm),Arrow(2mm)); draw((-3,0)--(3.5,0)); draw((0,0)--(0,1),linewidth(1mm),Arrow(2mm)); dot(Label("$A(z_a=2\e^{i\frac{\pi}{3}})$"),A); dot(Label("$B(z_a=\e^{i\frac{\pi}{6}})$"),B); dot(Label("$B'(z_{b'}=2z_b)$"),Bp); dot(Label("$\overline{A}(\overline{z_a})$"),conj(A)); dot(Label("$C(z_c=z_a z_c)$"),C,NE); dot(Label("$D(z_d=z_c-z_d)$"),D,NW); dot(Label("$E(z_e=iz_d)$"),E,NW);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); pair A=2expi(pi/2); pair homography(pair z) { return (z^2+A)/(z+2); } guide image; pair tpt; draw(unitcircle); for(real t=0; t<length(unitcircle);t+=.05) { tpt=homography(point(unitcircle,t)); image=image..tpt; draw(point(unitcircle,t)--tpt,dotted); } draw(image..cycle,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(4cm,0); path apath=(0,0)..(1,1)..(2,-1){dir(-90)}; draw(apath); dot(apath); dot(point(apath,length(apath)),.8green+8pt); draw(point(apath,0)--point(apath,1)--point(apath,2),.8red); draw(point(apath,0.5)--point(apath,1.5)--point(apath,2.5),.8blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); texpreamble("\usepackage{amsmath}"); path p = (0,0)..(1,1)..(2,.5){dir(0)}; real al = arclength(p); real l = length(p); pair pt = point(p,l/2); pair apt = arcpoint(p,al/2); draw(p); draw(subpath(p,0,arctime(p,al/2)),blue); dot(pt,red); dot(apt,blue); arrow("$\frac{\text{lenght(p)}}{2}$",pt,SSE,1cm); arrow("$\frac{\text{arclenght(p)}}{2}$",apt,SSW,1cm); label("\small The sizes of the blue path and the black path are equal",(1,.25));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(10cm,0); path apath=(0,0)..(1,1)..(2,.5){dir(0)}; real l=arclength(apath); real step=l/15; path arcpath(path apath, real t1, real t2) { return subpath(apath, arctime(apath,t1), arctime(apath,t2)); } for(real i=0; i<l-step; i+=step) draw(arcpath(apath,i,i+step),4bp+(i/l*red+(l-i)/l*blue),PenMargins); draw(apath);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,-.5), B=A+dir(45); pair C=(0,1), D=C+5dir(20); pair I=extension(A,B,C,D); path AB=A--B; path CD=C--D; draw(AB^^CD); dot("$I$",I,N,red); draw(B--I,1pt+dotted); dot("$A$",A,SE); dot("$B$",B,SE); dot("$C$",C,N); dot("$D$",D,N);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,-.5), B=A+dir(45); pair C=(0,1)+2dir(20); path cle=shift(C)*scale(1)*unitcircle; pair I1=intersectionpoint(A--interp(A,B,2),cle); pair I2=intersectionpoint(A--interp(A,B,10),cle); path AB=A--B; draw(AB^^cle); dot(I1^^I2,red); draw(B--I2,1pt+dotted);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); path Line(pair A, pair B) { return interp(A,B,-100000/arclength(A--B))--interp(A,B,100000/arclength(A--B)); } path Parallel(pair A, pair dir) { return Line(A,A+dir); } pair A=0, B=(1,0), C=(.7,.7); draw(A--B, .8red); draw(A--C, .8green); draw(B--C, .8blue); label("$A$",A,SW); label("$B$",B,SE); label("$C$",C,N); pair Ap=intersectionpoint(Parallel(B, A-C), Parallel(C, A-B)); pair Bp=intersectionpoint(Parallel(A, B-C), Parallel(C, A-B)); pair Cp=intersectionpoint(Parallel(A, B-C), Parallel(B, A-C)); draw(Ap--Bp, .8red); draw(Ap--Cp, .8green); draw(Bp--Cp, .8blue); label("$A'$",Ap,NE); label("$B'$",Bp,NW); label("$C'$",Cp,S);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); path p = (0,0){up} .. (2cm,0){up}; path q = (0,1cm){dir(-60)}..(1cm,-1cm)..{dir(60)}(2cm,1cm); draw(p, red); draw(q, blue); dot(intersectionpoint(p,q)); draw(point(p, intersect(p,q)[0])--postcontrol(p, intersect(p,q)[0]), .8red,Arrow); draw(point(q, intersect(p,q)[1])--postcontrol(q, intersect(p,q)[1]), .8blue,Arrow);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,0), B=(1,.5); path cle=shift(1.75,2.5)*unitcircle; pair pt, ptp; pair project(pair pt, pair A, pair B) { return extension(pt,pt-dir(90+degrees(A-B,false)),A,B); } draw(A--B); draw(cle); for (real t=0; t<=4; t+=.01) { pt=point(cle,t); ptp=project(pt,A,B); dot(ptp, red); draw(pt--ptp,dotted); }
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,0), B=(1,.5), C=(.25,1); pair project(pair pt, pair A, pair B) { return extension(pt,pt-dir(90+degrees(A-B,false)),A,B); } pair ocenter(pair A, pair B, pair C) { return extension(A, project(A,B,C), B, project(B,A,C)); } draw(A--B--C--cycle); pair orth=ocenter(A,B,C); pair Ap=project(A,B,C); pair Bp=project(B,A,C); pair Cp=project(C,A,B); dot(orth, red); dot(Ap^^Bp^^Cp); drawline(A, orth, dotted); drawline(B, orth, dotted); drawline(C, orth, dotted);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,0), B=(1,.5), C=(.25,1); pair ccenter(pair A, pair B, pair C) { pair mAB=midpoint(A--B); pair mAC=midpoint(A--C); return extension(mAB, rotate(90,mAB)*A, mAC, rotate(90,mAC)*A); } draw(A--B--C--cycle); pair circ=ccenter(A,B,C); pair mAB=midpoint(A--B); pair mAC=midpoint(A--C); pair mBC=midpoint(B--C); dot(circ, red); dot(mAB^^mAC^^mBC); drawline(mAB, circ, dotted); drawline(mAC, circ, dotted); drawline(mBC, circ, dotted); draw(shift(circ)*scale(abs(circ-A))*unitcircle);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair A=(0,0), B=(1,.5), C=(.25,1); pair project(pair pt, pair A, pair B) { return extension(pt,pt-dir(90+degrees(A-B,false)),A,B); } pair icenter(pair A, pair B, pair C) { return extension(A, A+dir(A--B,A--C), B, B+dir(B--A,B--C)); } draw(A--B--C--cycle); pair ins=icenter(A,B,C); pair iAB=project(ins,A,B); pair iAC=project(ins,A,C); pair iBC=project(ins,B,C); dot(ins, red); dot(iAB^^iAC^^iBC); drawline(A, ins, dotted); drawline(B, ins, dotted); drawline(C, ins, dotted); draw(shift(ins)*scale(abs(ins-iAB))*unitcircle);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); import math; pair project(pair pt, pair A, pair B) { return extension(pt,pt-dir(90+degrees(A-B,false)),A,B); } pair ecenter(pair A, pair B, pair C) { return extension(A, A+rotate(90)*dir(A--B,A--C), B, B+rotate(90)*dir(B--A,B--C)); } path ecircle(pair A, pair B, pair C) { return shift(ecenter(A,B,C))*scale(abs(ecenter(A,B,C)-project(ecenter(A,B,C),B,C)))*unitcircle; } pair A=(0,0), B=(3,0), C=(3,4); path tr=A--B--C--cycle; draw(ecircle(A,B,C)); draw(ecircle(B,C,A)); pen p=linewidth(1pt); drawline(A,B, p); drawline(A,C, p); drawline(B,C, p);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); defaultpen(2mm+linecap(0)); path p = (0,0){up} .. (2cm,0){up}; path q = (0,1cm){dir(-60)}..(1cm,-1cm)..{dir(60)}(2cm,1cm); draw(firstcut(p,q).before, .8red); draw(firstcut(p,q).after, .8blue); draw(lastcut(q,p).before, .8green); draw(lastcut(q,p).after, .8yellow);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); defaultpen(2mm+linecap(0)); path p = (0,0){up} .. (2cm,0){up}; path q = (0,1cm){dir(-60)}..(1cm,-1cm)..{dir(60)}(2cm,1cm); real[] ipq=intersect(p,q); real[] iprq=intersect(p,reverse(q)); draw(subpath(p, 0, ipq[0]), .8red); draw(subpath(p, ipq[0], iprq[0]), .5red); draw(subpath(p, iprq[0], length(p)), .3red); draw(subpath(reverse(q), 0, iprq[1]), .8green); draw(subpath(reverse(q), iprq[1], length(q)-ipq[1]), .5green); draw(subpath(reverse(q), length(q)-ipq[1], length(q)), .3green);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(15cm,0); srand(rand()); path p1 = randompath(9); path p2 = randompath(8); real Minx=min(min(p1).x,min(p2).x); real Maxx=max(max(p1).x,max(p2).x); real Miny=min(min(p1).y,min(p2).y); pair[] inter=intersectionpoints(p1,p2); int nb=inter.length; for (int i=0 ; i<nb; ++i) { dot(inter[i]); label("$" + (string) i +"$", inter[i],N); } draw(p1,.8red); draw(p2,.8green); label("I found " + (string) nb + " points of intersection.",((Maxx+Minx)/2,Miny),2S);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
//Translate from http://zoonek.free.fr/LaTeX/Metapost/metapost.html size(6cm,0); path a,b,c,d; a = (-1,-.2){up} .. tension 1.2 .. (1,-.2){down}; transform r90=rotate(90); b = r90*a; c = r90*b; d = r90*c; path bound=buildcycle(a,b,c,d); fill(bound, lightgrey); draw(a^^b^^c^^d,grey); draw(bound);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(6cm,0); path a,b,c; a = shift(1,0)*scale(2)*unitcircle; b = rotate(120)*a; c = rotate(120)*b; fill(a, red); fill(b, green); fill(c, blue); fill(buildcycle(a,b), red + green); fill(buildcycle(b,c), green + blue); fill(buildcycle(c,a), blue + red); fill(buildcycle(a,b,c), white); draw(a^^b^^c);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path pt1=scale(2cm)*unitcircle; path pt2=scale(1cm)*unitcircle; filldraw(pt1^^pt2,yellow+.9white);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path pt1=scale(2cm)*unitcircle; path pt2=scale(1cm)*unitcircle; filldraw(pt1^^pt2,evenodd+yellow+.9white);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path pt1=scale(2cm)*unitcircle; path pt2=scale(1cm)*unitcircle; path pt3=shift(0,.5cm)*pt2; filldraw(pt1^^pt2^^pt3,evenodd+yellow+.9white);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(0,0); path pt1=scale(2cm)*unitcircle; path pt2=scale(1cm)*unitcircle; path pt3=shift(0,1.5cm)*pt2; filldraw(pt1^^pt2^^pt3,evenodd+yellow+.9white);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
size(8cm,0); import patterns; add("hatchback",hatch(NW)); filldraw(xscale(2)*unitsquare,pattern("hatchback")); add("r_hatchback",hatch(2.5mm,NW,.8red)); filldraw(shift(0,-2)*yscale(2)*unitsquare,pattern("r_hatchback")); add("b_hatchback",hatch(NW,2.5mm+.8blue)); filldraw(shift(1,-2)*yscale(2)*unitsquare,pattern("b_hatchback"));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import three; size(10cm); currentlight=Viewport; surface s=surface(patch(new triple[][] { {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, {(0,1,0),(1,0,1),(1,0,1),(2,1,0)}, {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)}, {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}})); draw(s,yellow); draw(s.s[0].vequals(0.5),squarecap+2bp+blue,currentlight); draw(s.s[0].uequals(0.5),squarecap+2bp+red,currentlight);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); pen[] p={red,green,blue,magenta}; path g=(0,0){dir(45)}..(1,0)..(1,1)..(0,1)..cycle; tensorshade(g,p); dot(g);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(200,0); currentprojection=perspective(10,8,4); real f(pair z) {return 0.5+exp(-abs(z)^2);} draw((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle); draw(arc(0.12Z,0.2,90,60,90,25),ArcArrow3); surface s=surface(f,(-1,-1),(1,1),nx=5,Spline); xaxis3(Label("$x$"),red,Arrow3); yaxis3(Label("$y$"),red,Arrow3); zaxis3(XYZero(extend=true),red,Arrow3); draw(s,lightgray,meshpen=black+thick(),nolight,render(merge=true)); label("$O$",O,-Z+Y,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); pen[] p={red,green,blue,magenta}; pair[] z={(-1,0),(0,0),(0,1),(1,0)}; int[] edges={0,0,0,1}; gouraudshade(z[0]--z[2]--z[3]--cycle,p,z,edges); draw(z[0]--z[1]--z[2]--cycle); draw(z[1]--z[3]--z[2],dashed); dot(Label,z[0],W); dot(Label,z[1],S); dot(Label,z[2],N); dot(Label,z[3],E); label("0",z[0]--z[1],S,red); label("1",z[1]--z[2],E,red); label("2",z[2]--z[0],NW,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(140mm,70mm,IgnoreAspect); scale(false); real[] x={1,3,4,5,6}; real[] y={1,5,2,0,4}; marker mark=marker(scale(1mm)*cross(6,false,r=0.35),red,Fill); draw(graph(x,y,Hermite),"Hermite Spline",mark); xaxis("$x$",Bottom,LeftTicks(x)); yaxis("$y$",Left,LeftTicks); attach(legend(),point(NW),40S+30E,UnFill);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); pair z0=(0,0); pair z1=(0.5,3); pair z2=(2,1); path g=z0..z1..z2; pair d0=dir(g,0); pair d1=dir(g,1); draw(Label("$\omega_0$",1),z0-d0..z0+d0,blue+dashed,Arrow); draw(Label("$\omega_1$",1),z1-d1..z1+1.5d1,blue+dashed,Arrow); draw(z0--interp(z0,z1,1.5),dashed); draw(subpath(g,0,1),blue); draw("$\theta$",arc(z0,0.4,degrees(z1-z0),degrees(d0)),red,Arrow, EndPenMargin); draw("$\phi$",arc(z1,1.05,degrees(z1-z0),degrees(d1)),red,Arrow, EndPenMargin); dot("$z_0$",z0,SW,red); dot("$z_1$",z1,SE,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); pair z0=(0,0); pair z1=(1,2); pair z2=(2,1); path g=z0..z1..z2; label("$\ell_k$",z0--z1); draw("$\ell_{k+1}$",z1--z2,dashed); draw(z0--interp(z0,z1,1.5),dashed); pair d1=dir(g,1); draw(z1-d1..z1+d1,blue+dashed); draw(g,blue); draw(Label("$\theta_k$",0.4),arc(z1,0.4,degrees(z2-z1),degrees(d1)),blue,Arrow, EndPenMargin); draw("$\phi_k$",arc(z1,0.4,degrees(d1),degrees(z1-z0),CCW),Arrow, EndPenMargin); dot("$z_{k-1}$",z0,red); dot("$z_k$",z1,NW,red); dot("$z_{k+1}$",z2,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,150); import geometry; real a=3; real b=4; real c=hypot(a,b); pair z1=(0,b); pair z2=(a,0); pair z3=(a+b,0); perpendicular(z1,NE,z1--z2,blue); perpendicular(z3,NW,blue); draw(square((0,0),z3)); draw(square(z1,z2)); real d=0.3; pair v=unit(z2-z1); draw(baseline("$a$"),-d*I--z2-d*I,red,Bars,Arrows,PenMargins); draw(baseline("$b$"),z2-d*I--z3-d*I,red,Arrows,Bars,PenMargins); draw("$c$",z3+z2*I-d*v--z2-d*v,red,Arrows,PenMargins); draw("$a$",z3+d--z3+z2*I+d,red,Arrows,Bars,PenMargins); draw("$b$",z3+z2*I+d--z3+z3*I+d,red,Arrows,Bars,PenMargins);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; import palette; size(200,300,keepAspect=false); //settings.nothin=true; currentprojection=orthographic(10,10,30); currentlight=(10,10,5); triple f(pair t) {return (exp(t.x)*cos(t.y),exp(t.x)*sin(t.y),t.y);} surface s=surface(f,(-4,-2pi),(0,4pi),8,16,Spline); s.colors(palette(s.map(zpart),Rainbow())); draw(s,render(merge=true));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(0,200); size3(200,IgnoreAspect); currentprojection=perspective(5,2,2); scale(Linear,Linear,Log); xaxis3("$x$",0,1,red,OutTicks(2,2)); yaxis3("$y$",0,1,red,OutTicks(2,2)); zaxis3("$z$",1,30,red,OutTicks(beginlabel=false));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import beziercurve; pair midpoint(pair a, pair b) {return interp(a,b,0.5);} pair m0=midpoint(z0,c0); pair m1=midpoint(c0,c1); pair m2=midpoint(c1,z1); draw(m0--m1--m2,dashed); dot("$m_0$",m0,NW,red); dot("$m_1$",m1,N,red); dot("$m_2$",m2,red); pair m3=midpoint(m0,m1); pair m4=midpoint(m1,m2); pair m5=midpoint(m3,m4); draw(m3--m4,dashed); dot("$m_3$",m3,NW,red); dot("$m_4$",m4,NE,red); dot("$m_5$",m5,N,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(400); pair z0=(0,0); pair c0=(1,1); pair c1=(2,1); pair z1=(3,0); draw(z0..controls c0 and c1 .. z1,blue); draw(z0--c0--c1--z1,dashed); dot("$z_0$",z0,W,red); dot("$c_0$",c0,NW,red); dot("$c_1$",c1,NE,red); dot("$z_1$",z1,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(0,100); real f(real t) {return 1+cos(t);} path g=polargraph(f,0,2pi,operator ..)--cycle; filldraw(g,pink); xaxis("$x$",above=true); yaxis("$y$",above=true); dot("$(a,0)$",(1,0),N); dot("$(2a,0)$",(2,0),N+E);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(6cm,0); import math; currentpen=magenta; real r1=1; real r2=sqrt(7); real r3=4; pair O=0; path c1=circle(O,r1); draw(c1,green); draw(circle(O,r2),green); draw(circle(O,r3),green); real x=-0.6; real y=-0.8; real yD=0.3; pair A=(sqrt(r1^2-y^2),y); pair B=(-sqrt(r2^2-y^2),y); pair C=(x,sqrt(r3^2-x^2)); pair d=A+r2*dir(B--C); pair D=intersectionpoint(c1,A--d); draw(A--B--C--cycle); draw(interp(A,D,-0.5)--interp(A,D,1.5),blue); dot("$O$",O,S,red); dot("$A$",A,dir(C--A,B--A),red); dot("$B$",B,dir(C--B,A--B),red); dot("$C$",C,dir(A--C,B--C),red); dot("$D$",D,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ draw((0,0){up}::(100,25){right}::(200,0){down});
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,200); import geometry; real A=130; real B=40; pair O=(0,0); pair R=(1,0); pair P=dir(A); pair Q=dir(B); draw(circle(O,1.0)); draw(Q--O--P); draw(P--Q,red); draw(O--Q--R--cycle); draw("$A$",arc(R,O,P,0.3),blue,Arrow,PenMargin); draw("$B$",arc(R,O,Q,0.6),blue,Arrow,PenMargin); pair S=(Cos(B),0); draw(Q--S,blue); perpendicular(S,NE,blue); dot(O); dot("$R=(1,0)$",R); dot("$P=(\cos A,\sin A)$",P,dir(O--P)+W); dot("$Q=(\cos B,\sin B)$",Q,dir(O--Q));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import three; currentprojection=orthographic(5,4,2,center=true); size(5cm); size3(3cm,5cm,8cm); draw(unitbox); dot(unitbox,red); label("$O$",(0,0,0),NW); label("(1,0,0)",(1,0,0),S); label("(0,1,0)",(0,1,0),E); label("(0,0,1)",(0,0,1),Z);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); import labelpath; labelpath("This is a test of curved labels in Asymptote (implemented with the {\tt PSTricks pstextpath} macro).",reverse(rotate(-90)*unitcircle));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import solids; size(0,100); currentlight=Viewport; revolution r=cylinder(O,1,1.5,Y+Z); draw(surface(r),green,render(merge=true)); draw(r,blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import solids; size(0,100); revolution r=cylinder(O,1,1.5,Y+Z); draw(r,heavygreen);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ draw((0,0){up}..(100,25){right}..(200,0){down});
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(200,200,IgnoreAspect); currentprojection=perspective(4,2,3); real f(pair z) {return z.y^3/2-3z.x^2*z.y;} draw(surface(f,(-1,-1),(1,1),nx=10,Spline),green,render(merge=true)); draw(Label("$y$",1),(0,0,0)--(0,2,0),red,Arrow3); draw(Label("$x$",1),(0,0,0)--(2,0,0),red,Arrow3); draw(Label("$z$",1),(0,0,0)--(0,0,2.5),red,Arrow3); label("$z=\frac{1}{2}y^3-3x^2y$",(1,1,1),NE);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(10cm,0); import math; pair b=(0,0), c=(1,0); pair a=extension(b,b+dir(60),c,c+dir(120)); pair d=extension(b,b+dir(30),a,a+dir(270)); draw(a--b--c--a--d--b^^d--c); label("$A$",a,N); label("$B$",b,W); label("$C$",c,E); label("$D$",d,S);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(150,0); real f(real x) {return exp(x);} pair F(real x) {return (x,f(x));} xaxis("$x$"); yaxis("$y$",0); draw(graph(f,-4,2,operator ..),red); labely(1,E); label("$e^x$",F(1),SE);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import math; size(100,0); pair z4=(0,0); pair z7=(2,0); pair z1=point(rotate(60)*(z4--z7),1); pair z5=interp(z4,z7,0.5); pair z3=interp(z7,z1,0.5); pair z2=interp(z1,z4,0.5); pair z6=extension(z4,z3,z7,z2); draw(z4--z7--z1--cycle); draw(z4--z3); draw(z7--z2); draw(z1--z5); draw(circle(z6,abs(z3-z6))); label("1",z1,dir(z5--z1)); label("2",z2,dir(z7--z2)); label("3",z3,dir(z4--z3)); label("4",z4,dir(z3--z4)); label("5",z5,dir(z1--z5)); label("6",z6,2.5E+0.1*N); label("7",z7,dir(z2--z7));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,100); import patterns; add("hatch",hatch()); add("hatchback",hatch(NW)); add("crosshatch",crosshatch(3mm)); real s=1.25; filldraw(unitsquare,pattern("hatch")); filldraw(shift(s,0)*unitsquare,pattern("hatchback")); filldraw(shift(2s,0)*unitsquare,pattern("crosshatch"));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(3cm); draw(unitsquare); label("$A$",(0,0),SW); label("$B$",(1,0),SE); label("$C$",(1,1),NE); label("$D$",(0,1),NW);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(200); pen[][] p={{white,grey,black}, {red,green,blue}, {cyan,magenta,yellow}}; latticeshade(unitsquare,p);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(250,200,IgnoreAspect); real Sin(real t) {return sin(2pi*t);} real Cos(real t) {return cos(2pi*t);} draw(graph(Sin,0,1),red,"$\sin(2\pi x)$"); draw(graph(Cos,0,1),blue,"$\cos(2\pi x)$"); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero)); label("LABEL",point(0),UnFill(1mm)); attach(legend(),truepoint(E),20E,UnFill);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(400,200,IgnoreAspect); real Sin(real t) {return sin(2pi*t);} real Cos(real t) {return cos(2pi*t);} draw(graph(Sin,0,1),red,"$\sin(2\pi x)$"); draw(graph(Cos,0,1),blue,"$\cos(2\pi x)$"); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero)); label("LABEL",point(0),UnFill(1mm)); add(legend(),point(E),20E,UnFill);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import math; int n=7; size(200,0); draw(unitcircle,red); for (int i=0; i < n-1; ++i) for (int j=i+1; j < n; ++j) drawline(unityroot(n,i),unityroot(n,j),blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ void testline(real y) { draw((0,y)--(100,y),currentpen+solid); draw((0,y-10)--(100,y-10),currentpen+dotted); draw((0,y-20)--(100,y-20),currentpen+dashed); draw((0,y-30)--(100,y-30),currentpen+longdashed); draw((0,y-40)--(100,y-40),currentpen+dashdotted); draw((0,y-50)--(100,y-50),currentpen+longdashdotted); draw((0,y-60)--(100,y-60),currentpen+Dotted); } currentpen=linewidth(0.5); testline(100);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(150,0); real f(real x) {return log(x);} pair F(real x) {return (x,f(x));} xaxis("$x$",0); yaxis("$y$"); draw(graph(f,0.01,10,operator ..)); labelx(1,SSE); label("$\log x$",F(7),SE);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(200,IgnoreAspect); real f(real x) {return 1/x;}; bool3 branch(real x) { static int lastsign=0; if(x == 0) return false; int sign=sgn(x); bool b=lastsign == 0 || sign == lastsign; lastsign=sign; return b ? true : default; } draw(graph(f,-1,1,branch)); axes("$x$","$y$",red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(0,200); real x(real t) {return cos(2pi*t);} real y(real t) {return sin(2pi*t);} draw(graph(x,y,0,1)); //xlimits(0,1,Crop); //ylimits(-1,0,Crop); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(200,0); currentprojection=orthographic(4,0,2); real R=2; real a=1.9; triple f(pair t) { return ((R+a*cos(t.y))*cos(t.x),(R+a*cos(t.y))*sin(t.x),a*sin(t.y)); } pen p=rgb(0.2,0.5,0.7); surface s=surface(f,(0,0),(2pi,2pi),8,8,Spline); // surface only //draw(s,lightgray); // mesh only // draw(s,nullpen,meshpen=p); // surface & mesh draw(s,lightgray,meshpen=p,render(merge=true));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; import grid3; import palette; currentprojection=orthographic(0.8,1,2); size(400,300,IgnoreAspect); real f(pair z) {return cos(2*pi*z.x)*sin(2*pi*z.y);} surface s=surface(f,(-1/2,-1/2),(1/2,1/2),50,Spline); surface S=planeproject(unitsquare3)*s; S.colors(palette(s.map(zpart),Rainbow())); draw(S,nolight); draw(s,lightgray+opacity(0.7)); grid3(XYZgrid);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import solids; import palette; currentprojection=orthographic(20,0,3); size(400,300,IgnoreAspect); revolution r=revolution(new real(real x) {return sin(x)*exp(-x/2);}, 0,2pi,operator ..,Z); surface s=surface(r); surface S=planeproject(shift(-Z)*unitsquare3)*s; S.colors(palette(s.map(zpart),Rainbow())); render render=render(compression=Low,merge=true); draw(S,render); draw(s,lightgray,render);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(100,0); draw((1,0){up}..{left}(0,1),Arrow);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,100); path unitcircle=E..N..W..S..cycle; path g=scale(2)*unitcircle; label("$a \le r \le b$"); radialshade(unitcircle^^g,yellow+evenodd,(0,0),1.0,yellow+brown,(0,0),2);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(200,0); triple f(pair t) { return(t.x+t.y/4+sin(t.y),cos(t.y),sin(t.y)); } surface s=surface(f,(0,0),(2pi,2pi),7,20,Spline); draw(s,olive,render(merge=true));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import three; size(100,0); path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle; draw(g); draw(((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle)); dot(g,red);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(100,0); radialshade(unitsquare,yellow,(0,0),0,red,(0,0),1);
![]() |
|
(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; axialshade(tiling,square,white,(0,0),black,(d,d)); fill(tiling,shift(d,d)*square,blue); add("shadedtiling",tiling); filldraw(unitcircle,pattern("shadedtiling"));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(100); radialshade(W..N..E--(0,0),stroke=true, red+linewidth(30),(0,0),0.25,yellow,(0,0),1);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(200,0); real f(real x) {return (x != 0) ? sin(1/x) : 0;} real T(real x) {return 2/(x*pi);} real a=-4/pi, b=4/pi; int n=150,m=5; xaxis("$x$",red); yaxis(red); draw(graph(f,a,-T(m),n)--graph(f,-m,-(m+n),n,T)--(0,f(0))--graph(f,m+n,m,n,T)-- graph(f,T(m),b,n)); label("$\sin\frac{1}{x}$",(b,f(b)),SW);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import three; size(200); currentprojection=orthographic(5,4,3); draw(unitsphere,green,render(compression=Zero,merge=true));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import solids; settings.render=0; settings.prc=false; size(200); revolution r=sphere(O,1); draw(r,1,longitudinalpen=nullpen); draw(r.silhouette());
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(100); import solids; currentprojection=orthographic(5,4,2); revolution sphere=sphere(1); draw(surface(sphere),green+opacity(0.2)); draw(sphere,m=7,blue);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,150); import graph; real f(real t) {return exp(-t/(2pi));} draw(polargraph(f,0,20*pi,operator ..)); xaxis("$x$",-infinity,1.3); yaxis("$y$",-infinity,1); labelx(1); labelx("$e^{-1}$",1.0/exp(1),SE);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import spring; drawspring(0,"$L$");
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import spring; drawspring(40.0,"$L+x$");
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(3cm); draw((0,0)--(1,0)--(1,1)--(0,1)--cycle);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(100); import math; int n=5; path p; int i=0; do { p=p--unityroot(n,i); i=(i+2) % n; } while(i != 0); filldraw(p--cycle,red+evenodd);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ picture pic1; real size=50; size(pic1,size); fill(pic1,(0,0)--(50,100)--(100,0)--cycle,red); picture pic2; size(pic2,size); fill(pic2,unitcircle,green); picture pic3; size(pic3,size); fill(pic3,unitsquare,blue); picture pic; add(pic,pic1.fit(),(0,0),N); add(pic,pic2.fit(),(0,0),10S); add(pic.fit(),(0,0),N); add(pic3.fit(),(0,0),10S);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(100,0); real f(real x) {return tanh(x);} pair F(real x) {return (x,f(x));} xaxis("$x$"); yaxis("$y$"); draw(graph(f,-2.5,2.5,operator ..)); label("$\tanh x$",F(1.5),1.25*N);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,100); import geometry; triangle t=triangle(b=3,alpha=90,c=4); dot((0,0)); draw(t); draw(rotate(90)*t,red); draw(shift((-4,0))*t,blue); draw(reflect((0,0),(1,0))*t,green); draw(slant(2)*t,magenta);
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph3; size(200,0); currentlight=Viewport; triple f(pair t) { real u=log(abs(tan(t.y/2))); return (10*sin(t.y),cos(t.x)*(cos(t.y)+u),sin(t.x)*(cos(t.y)+u)); } surface s=surface(f,(0,pi/2),(2pi,pi-0.1),7,15,Spline); draw(s,olive+0.25*white,render(compression=Low,merge=true));
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ import graph; size(300,0); real f(real x) {return (x != 0.0) ? x * sin(1.0 / x) : 0.0;} pair F(real x) {return (x,f(x));} xaxis("$x$",red); yaxis(red); draw(graph(f,-1.2/pi,1.2/pi,1000)); label("$x\sin\frac{1}{x}$",F(1.1/pi),NW); picture pic; size(pic,50,IgnoreAspect); xaxis(pic,red); yaxis(pic,red); draw(pic,graph(pic,f,-0.1/pi,0.1/pi,1000)); add(new void(frame f, transform t) { frame G=shift(point(f,N+0.85W))*align(bbox(pic,blue),10SE); add(f,G); draw(f,t*box(min(pic,user=true),max(pic,user=true)),blue); draw(f,point(G,E)--t*point(pic,W),blue); });
![]() |
|
(Compiled with Asymptote version 2.14svn-r5318) |
/* This code comes from The Official Asymptote Gallery */ size(0,25cm); guide center=(0,1){W}..tension 0.8..(0,0){(1,-.5)}..tension 0.8..{W}(0,-1); draw((0,1)..(-1,0)..(0,-1)); filldraw(center{E}..{N}(1,0)..{W}cycle); unfill(circle((0,0.5),0.125)); fill(circle((0,-0.5),0.125));