


















































































































|
|
| Figure 0001: fig0010.asy |
size(8cm,0); import geometry_dev; /* View the definition of struct coordsys */ show(currentcoordsys); pair a=(0,0.5), b=(1,0.5); /* View the definition of struct point */ point A=a, B=b; dot("$A$",A); dot("$B$",B);
|
|
| Figure 0002: fig0020.asy |
size(8cm,0); import geometry_dev; show(currentcoordsys); pair a=(0,0.5), b=(1,0.5); point A=a, B=b; dot("$A$",A); dot("$B$",B); /* View the definition of coordsys cartesiansystem(pair,pair,pair) */ currentcoordsys=cartesiansystem((0.5,0.5), i=(0.7,0.7), j=(-0.7,0.7)); show("$O'$", "$\vec{u'}$", "$\vec{v'}$", currentcoordsys, xpen=invisible); point Ap=a; /* View the definition of point point(coordsys,explicit point) */ point Bp=point(currentcoordsys,B); // same as 'point Bp=b;' dot("$A'$",Ap); dot("$B'$",Bp); dot("$M$",(Ap+Bp)/2);
|
|
| Figure 0003: fig0030.asy |
size(8cm,0); import geometry_dev; show(currentcoordsys); pair a=(0,0.5), b=(1,0.5); point A=a, B=b; dot("$A$",A); dot("$B$",B); /* View the definition of coordsys cartesiansystem(pair,pair,pair) */ currentcoordsys=cartesiansystem((0.5,0.5), i=(0.7,0.7), j=(-0.7,0.7)); show("$O'$", "$\vec{u'}$", "$\vec{v'}$", currentcoordsys, xpen=invisible); point Ap=a; /* View the definition of point point(coordsys,explicit point) */ point Bp=point(currentcoordsys,B); // same as 'point Bp=b;' dot("$A'$",Ap); dot("$B'$",Bp); dot("$M$",(Ap+Bp)/2); draw(Ap--Bp); /* View the definition of point locate(pair) */ draw(locate((0,0))--Bp,blue); /* View the definition of pair locate(point) */ draw((0,0)--locate(Bp),0.8*green);
|
|
| Figure 0004: fig0040.asy |
size(8cm,0); import geometry_dev; coordsys R=defaultcoordsys; show(R); coordsys Rp=cartesiansystem((0.5,0.5), i=(0.35,0.35), j=(-0.35,0.35)); show("$O'$", "$\vec{\imath'}$", "$\vec{\jmath'}$", Rp, ipen=blue, xpen=invisible); coordsys Rpp=cartesiansystem((-1,-0.5), i=rotate(-90)*(0.35,0.35), j=rotate(-90)*(-0.35,0.35)); show("$O''$", "$\vec{\imath''}$", "$\vec{\jmath''}$", Rpp, ipen=green, xpen=invisible); pair m=(1,1); /* View the definition of point point(coordsys,pair) */ dot("",point(R,m),red); // Same as 'dot("",m,red);' dot("",point(Rp,m),blue); point M=m; /* View the definition of point point(coordsys,explicit point) */ dot("",point(Rpp,M),green); // Works also with 'point' pair p=(-0.75,0.75); point P=point(R,(-0.75,0.75)); dot("$P$",P,2E,4mm+red); // There are two methods for changing // the coordinate system of a point (or a pair) /* View the definition of pair /(pair,coordsys) */ dot("$P'$",point(Rp,p/Rp),2S,3mm+blue); // Necessary for 'pair' dot("$P'$",point(Rp,P/Rp),2N,3mm+blue); // but works with 'point' by casting. /* View the definition of point changecoordsys(coordsys,point) */ dot("$P''$",changecoordsys(Rpp,P),2W,1.5mm+green); // Useful for 'point'.
|
|
| Figure 0005: fig0050.asy |
import geometry_dev; size(8cm,0); currentcoordsys=cartesiansystem((1.25,0.75),i=(1,1),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys R=defaultcoordsys; show("$O$", "$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$","$\vec{u}$","$\vec{u}$", Rp, xpen=invisible); vector w=(0.125,0.5); point P=(1,0.5); dot("$P$",P); draw(Label("$\overrightarrow{w}$",EndPoint), origin()--origin()+w, Arrow); draw("$\overrightarrow{O'P}+\overrightarrow{w}$", origin()--P+w, Arrow); dot("$M$",P+w,red); /* View the definition of pair locate(explicit vector) */ draw("$\overrightarrow{w}$", (0,0)--locate(w), W,Arrow);
|
|
| Figure 0006: fig0060.asy |
import geometry_dev; size(12cm,0); currentcoordsys=cartesiansystem((1.25,0.75),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys R=defaultcoordsys; show(Label("$O$",align=SE), "$\vec{\imath}$", Label("$\vec{\jmath}$",align=E), R); show("$O'$", "$\vec{u}$", "$\vec{v}$", Rp, xpen=invisible); vector w=(0.25,0.5); point P=(1,0.5); dot("$P$",P,W); show("$\overrightarrow{w}$", w); /* View the definition of transform rotateO(real) */ point Pp=rotateO(90)*P; dot("Pp=rotateO(90)*P", Pp, W); dot("rotate(90,Pp)*P", rotate(90,Pp)*P, W); /* View the definition of transform scale(real,point) */ dot("scale(-2,Pp)*P", scale(-2,Pp)*P, NE); /* View the definition of transform scaleO(real) */ dot("scaleO(2)*P", scaleO(2)*P,red); /* View the definition of transform xscaleO(real) */ dot("xscaleO(2)*P", xscaleO(2)*P); /* View the definition of transform yscaleO(real) */ dot("yscaleO(2)*P", yscaleO(2)*P,W); vector wp=rotateO(90)*w; show("$\overrightarrow{w'}$", wp); draw("$\overrightarrow{w}$", (0,0)--locate(w), W, Arrow); draw("$\overrightarrow{w'}$", (0,0)--locate(wp), S, Arrow);
|
|
| Figure 0007: fig0070.asy |
import geometry_dev; size(15cm); currentcoordsys=cartesiansystem((0,0),i=(1,0.5),j=(-1,0.5)); coordsys R=currentcoordsys; show(R, xpen=invisible); point A=(2,2); dot("A",A,SE); point B=(3,1.5); dot("B",B,SE); point C=A+(4,2); dot("C",C); drawline(A,B,red); drawline(A,C,blue); /* View the definition of transform scale(real,point,point,point,point,bool) */ transform t=scale(2,A,B,A,C); /* View the definition of transform projection(point,point,point,point,bool) */ transform proj=projection(A,B,A,C); point M=(2,4); point Mh=proj*M; dot("$H_M$",Mh,SE); dot("$M$",M); point Mp=t*M; dot("\small$scale(2,A,B,A,C)*M=M'$",Mp,W); drawline(M,Mh); point P=(1,-1); point Ph=proj*P; dot("$H_P$",Ph,NW); drawline(P,Ph); dot("$P$",P); transform t=scale(-1,A,B,A,C); point Pp=t*P; dot("\small$P'=scale(-1,A,B,A,C)*P$",Pp); draw(P--Pp);
|
|
| Figure 0008: fig0080.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((1.5,1.5),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys Rs=cartesiansystem((-1.5,1.5),i=(-1,0.5),j=(-1,-1)); coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); show("$O''$","$\vec{u'}$","$\vec{v'}$", Rs, xpen=invisible); pair w=(0.75,1.5); draw("$\overrightarrow{w}$",(0,0)--w,Arrow); pair P=(1,1); dot("$P$",P); dot("$P$",point(Rp,P/Rp),N); dot("$P$",point(Rs,P/Rs),S); show("$\overrightarrow{w'}$", vector(w)); show("$\overrightarrow{w''}$", vector(Rs,w)); dot("$P'$",point(Rp,P)); dot("$P''$",point(Rs,P));
|
|
| Figure 0009: fig0090.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((1.5,1.5),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys Rs=cartesiansystem((-1.5,1.5),i=(-1,0.5),j=(-1,-1)); coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); show("$O''$","$\vec{u'}$","$\vec{v'}$", Rs, xpen=invisible); pair P=(1,1); dot("$P$",P); draw(format("$\vert OP\vert\simeq %.2f$",abs(P)),(0,0)--P,Arrows); point Pp=P; dot("$P'$",Pp); vector wp=Pp; show(format("$\vert O'P'\vert= %.2f$",abs(Pp)), wp, Arrows); point Ps=point(Rs,P); dot("$P''$",Ps,S); vector ws=Ps; show(format("$\vert O''P''\vert\simeq %.2f$",abs(Ps)), ws, Arrows);
|
|
| Figure 0010: fig0100.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((1.5,1.5),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$", "$\vec{u}$", Label("$\vec{v}$",align=NE), Rp, xpen=invisible); pair w=(1.5,0.75); draw("$\overrightarrow{w}$",(0,0)--w,Arrow); pair P=(1,-1); dot("$P$",P); show("$\overrightarrow{w'}$", vector(w)); dot("$P'$",point(Rp,P),N); point Ip=I; dot("$I'$",Ip,N); dot("$I'*P'$",Ip*point(Rp,P),S); dot("$I*P'$",I*point(Rp,P),N); vector wp=Ip*vector(w); show(Label("$I'*\overrightarrow{w'}$",EndPoint), wp); vector foo=I*vector(w); show("$I*\overrightarrow{w'}$", foo);
|
|
| Figure 0011: fig0110.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((1.5,1.5),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys Rs=cartesiansystem((-1.5,1.5),i=(-1,0.5),j=(-1,-1)); coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); show("$O''$","$\vec{u'}$","$\vec{v'}$", Rs, xpen=invisible); int n=64; real step=2pi/n; for (int i=0; i<n; ++i) { pen p=(i/n)*red; dot(point(R,R.polar(1,step*i)),p); dot(point(Rp,Rp.polar(1,step*i)),p); dot(point(Rs,Rs.polar(1,step*i)),p); }
|
|
| Figure 0012: fig0120.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$", "$\vec{u}$", "$\vec{v}$", Rp, xpen=invisible); pair a=(0.5,0.5); pair b=(-0.5,-1); point A=point(R,a), B=point(R,b); dot("$A$",A,NW); dot("$B$",B,S); line l=line(A,B); point Ap=a, Bp=b; dot("$A'$",Ap,W); dot("$B'$",Bp,SE); line lp=line(Ap,Bp); draw(l^^lp); draw(l.A--l.A+l.u,blue,Arrow); draw(l.A--l.A+l.v,blue,Arrow); draw(lp.A--lp.A+lp.u,blue,Arrow); draw(lp.A--lp.A+lp.v,blue,Arrow);
|
|
| Figure 0013: fig0130.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; coordsys Rs=cartesiansystem((-1,2),i=(-1,0.5),j=(-1,-1)); coordsys R=defaultcoordsys; show("$O$","$\vec{\imath}$", "$\vec{\jmath}$", R); show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); show("$O''$", "$\vec{u'}$", "$\vec{v'}$", Rs, xpen=invisible); pair a=(0.5,0.5); pair b=(-0.5,-1); point A=point(R,a), B=point(R,b); dot("$A$",A,S); dot("$B$",B,S); line l=line(A,B); point Ap=a, Bp=b; dot("$A'$",Ap); dot("$B'$",Bp,SE); line lp=line(Ap,Bp); point As=point(Rs,a), Bs=point(Rs,b); dot("$A''$",As,S); dot("$B''$",Bs,SE); line ls=line(As,Bs); draw(l^^lp^^ls); dot(intersectionpoint(l,lp),2mm+red); dot(intersectionpoint(l,ls),2mm+red); dot(intersectionpoint(lp,ls),2mm+red);
|
|
| Figure 0014: fig0140.asy |
include fig0130; point w=l.A+1.5*l.v; draw(Label("$w$",EndPoint),l.A--w,Arrow); point wp=lp.A+1.5*lp.v; draw(Label("$w'$",EndPoint),lp.A--wp,Arrow); point ws=ls.A+1.5*ls.v; draw(Label("$w''$",EndPoint),ls.A--ws,Arrow); int n=64; real step=2pi/n; for (int i=0; i<n; ++i) { point p=B+point(R,R.polar(1,step*i)); dot(p,sameside(p,w,l) ? black : blue); point p=Ap+point(Rp,Rp.polar(1,step*i)); dot(p,sameside(p,wp,lp) ? black : blue); point p=As+point(Rs,Rs.polar(1,step*i)); dot(p,sameside(p,ws,ls) ? black : blue); }
|
|
| Figure 0015: fig0150.asy |
size(12cm,0); import geometry_dev; import base_pi; dotfactor*=2; currentcoordsys=cartesiansystem((0,0),i=(1,0.5),j=(-1,1)); coordsys Rp=currentcoordsys; show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); path cle=randompath(20); draw(cle); point A=(0,1.5), B=(1,-0.5); line l=line(A,B); draw(l); /* View the definition of pair[] intersectionpoints(line,path) */ dot(intersectionpoints(l,cle));
|
|
| Figure 0016: fig0160.asy |
size(10cm); import geometry_dev; dotfactor*=1.5; linemargin = 5mm; currentcoordsys=cartesiansystem((2,1),i=(1,1),j=(-4,1)); show(currentcoordsys); point A=(1,1), B=(2,1); /* View the definition of struct line */ line l1=line(A,B);/* View the definition of line line(point,bool,point,bool) */ /* View the definition of void draw(picture,Label,line,bool,bool,align,pen,arrowbar,Label,marker) */ draw(l1,red); dot("$A$",A); dot("$B$",B); for (int i=0; i<10; ++i){ pair bad=(i,l1.slope*i+l1.origin); point good=bad; draw(Label("bad",align=S),bad,linewidth(2bp)); draw(Label(good @ l1 ? "good":"bad",align=W),good,linewidth(2bp)); }
|
|
| Figure 0017: fig0170.asy |
unitsize(1cm); import geometry_dev; dotfactor*=1.5; linemargin=5mm; // currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-1,1)); show(currentcoordsys); point A=(-3,-1), B=(3,4); line l1=line(A,B); draw(l1,red); dot("$A$",A,SE); dot("$B$",B,NW); point M=(2,-2); dot("$M$",M); /* View the definition of line parallel(point,line) */ draw(parallel(M,l1),red); /* View the definition of line perpendicular(point,line) */ line perp=perpendicular(M,l1); draw(perp); /* View the definition of point intersectionpoint(line,line) */ point interp=intersectionpoint(l1,perp); dot(interp,green); /* View the definition of void markrightangle(picture,point,point,point,real,pen,margin,filltype) */ markrightangle(l1.A,interp,rotate(180,interp)*M,size=5mm); draw(box((-5,-5),(5,5)),invisible);
|
|
| Figure 0018: fig0180.asy |
unitsize(1cm); import geometry_dev; dotfactor*=1.5; currentcoordsys=cartesiansystem((0,0),i=expi(pi/8)*(1.5,0),j=expi(pi/8)*(0,1)); show(currentcoordsys); point A=(-1,-3), B=(5,2); line l1=line(A,B); draw(l1,red); dot("$A$",A,SE); dot("$B$",B,NW); point M=(3,-3); dot("$M$",M); /* View the definition of transform projection(line) */ point P=projection(l1)*M; dot("$P$",P,2W); draw(M--P); markrightangle(l1.A,P,M); /* View the definition of transform vprojection(line,bool) */ point Q=vprojection(l1)*M; dot("$Q$",Q,2W); draw(M--Q); /* View the definition of transform hprojection(line,bool) */ point R=hprojection(l1)*M; dot("$R$",R,2W); draw(M--R); /* View the definition of transform projection(line,line,bool) */ point S=projection(l1,line((0,0),(0,1)))*M; dot("$S$",S,2W); draw(M--S,red); draw(box((-1,-4),(7,5)),invisible);
|
|
| Figure 0019: fig0190.asy |
unitsize(1cm); import geometry_dev; dotfactor*=1.5; linemargin=5mm; // currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-1,1)); show(currentcoordsys); point A=(-3,-3), B=(3,4), C=(1,-2); line l1=line(A,B); draw(l1,red); dot("$A$",A,SE); dot("$B$",B,NW); /* View the definition of line line(real,point) */ line l2=line(100,C); draw(l2,blue); dot("$C$",C); point M=relpoint(A--C,0.6); dot("$M$",M); /* View the definition of transform projection(line,line,bool) */ point P=projection(l1,l2)*M; dot("$P$",P,2W); draw(line(M,P),blue+dashed); draw(box((-5,-5),(5,5)),invisible);
|
|
| Figure 0020: fig0200.asy |
size(12cm); import geometry_dev; dotfactor*=1.5; currentcoordsys=cartesiansystem((2,1),i=(1,1),j=(-4,1)); show(currentcoordsys); point A=(1,1), B=(2,1); line l1=line(A,B); draw(l1); dot("$A$",A); dot("$B$",B); point C=(-1,0), D=(-2,-2); line l2=line(C,D); draw(l2); dot("$C$",C,S); dot("$D$",D,N); point M=(2,-0.5); dot("$M$",M,0.8*red); /* View the definition of point[] sameside(point,line,line) */ point[] Ms=sameside(M,l1,l2); draw(M--Ms[0]^^M--Ms[1],0.8red); dot(Ms[0]^^Ms[1],0.8red); point P=(-3,-1); dot("$P$",P,S,blue); point[] Ps=sameside(P,l1,l2); draw(P--Ps[0]^^P--Ps[1],blue); dot(Ps[0]^^Ps[1],blue); point Q=(2,1.5); dot("$Q$",Q,N,green); point[] Qs=sameside(Q,l1,l2); draw(Q--Qs[0]^^Q--Qs[1],green); dot(Qs[0]^^Qs[1],green);
|
|
| Figure 0021: fig0210.asy |
size(12cm); import geometry_dev; currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,1)); show(currentcoordsys); point A=(1,1); line l1=line(45,A); draw("$(l_1)$",l1); dot("$A$",A); point B=(3,1); line l2=line(-60,B); draw("$(l_2)$",l2); dot("$B$",B); markangleradiusfactor*=5; /* View the definition of void markangle(picture,Label,int,real,real,line,line,explicit pair,arrowbar,pen,margin,marker) */ markangle(2,l1,l2,dir(-10),0.8*green,StickIntervalMarker(i=1,n=2)); markangle(2,radius=-0.5*markangleradius(), l2,l1,dir(190),0.8*blue); markangle(l2,l1,dir(190),Arrow,StickIntervalMarker(i=1,n=2)); /* View the definition of real sharpdegrees(line,line) */ markangle((string) sharpdegrees(l2,l1), radius=1.5*markangleradius(), l2,l1,dir(170),Arrow,red);
|
|
| Figure 0022: fig0220.asy |
unitsize(2cm); import geometry_dev; currentcoordsys=cartesiansystem((2,1),i=(1,0.25),j=(-0.25,.75)); show(lo=Label("$O$",align=SE+0.5E), currentcoordsys); pair A=(1,1), B=(2,2); line l1=line(A,B); draw("$(l_1)$",l1); line l2=rotate(100,(3,3))*l1; draw("$(l_2)$",l2); write(locate(intersectionpoint(l1,l2))); /* View the definition of line bisector(line,line,real,bool) */ line bis=bisector(l1,l2); draw(bis); line Bis=bisector(l1,l2,90); draw(Bis,0.8*red); markangleradiusfactor*=5; markangle(2, l1, l2, StickIntervalMarker(2,2,true)); markangle(2, l1, l2, dir(-1), radius=1.25*markangleradius(), StickIntervalMarker(2,1,true)); /* View the definition of bool concurrent(...line[]) */ if (concurrent(bis,l1,l2,Bis)) label("Concurrent",(3,3), dir(135)); draw(box(locate((-1,0)),locate((5,5))),invisible);
|
|
| Figure 0023: fig0230.asy |
import geometry_dev; size(12cm,0); currentcoordsys=cartesiansystem((2,1),i=expi(pi/18)*(1,0),j=expi(pi/18)*(0,1)); show(currentcoordsys,xpen=invisible); point A=(-1.5,-1); point C=(-1,1); point B=(-1,0); dot("$A$", A, 2W); dot("$B$", B, 2E); line l1=hline()+C; draw("$(l_1)$", l1, blue); dot("$C$", C, NE); line l2=line(A, B, false); draw(Label("$(AB]$",Relative(.25),SE), l2, green); /* View the definition of line complementary(explicit line) */ draw("Complementary of $(AB]$", complementary(l2), dotted+roundcap); point p=intersectionpoint(l1,l2); /* View the definition of bool defined(pair) */ string s="$(l_1)$" + (defined(p) ? " intersects " : " does not intersect ") + "$(AB]$"; label(s, A+1.75*l2.u,W); draw(box(locate((-2,-2)),locate((2,2))), invisible);
|
|
| Figure 0024: fig0240.asy |
import geometry_dev; size(15cm,0); // currentcoordsys=cartesiansystem((2,1),i=(1,0.25),j=(-0.25,.75)); // show(lj=Label("$\vec{\jmath}$",EndPoint), currentcoordsys); point A=(-1,-0.5); point B=(1,-0.5); point C=(-1,0.5); line l1=line(A,B); draw("$(l_1)$",l1,red); /* View the definition of struct segment */ segment s=segment(A,B); draw(s, linewidth(2bp)); dot("$A$", A, SW); dot("$B$", B, SE); dot("$C$", C, S); segment s1=parallel(C,s); draw(Label("$s_1$",Relative(0.75)),s1); Label lt=Label("Complementary of $s_1$",Relative(0.5),align=N,grey); Label[] L={lt, lt}; /* View the definition of line[] complementary(explicit segment) */ line[] cs1=complementary(s1); /* View the definition of void draw(picture,Label[],line[],align,pen,arrowbar,Label,marker) */ draw(L, cs1, 2mm+lightgrey); draw(box(locate((-2.5,-1)),locate((2.5,1))), invisible);
|
|
| Figure 0025: fig0250.asy |
unitsize(2cm); import geometry_dev; linemargin=5mm; // currentcoordsys=cartesiansystem((2,1),i=(1,0.25),j=(-0.25,.75)); // show(li=Label("$\vec{\imath}$",align=S,EndPoint), currentcoordsys); point A=(-1,-1), B=(1,0.5); line l1=line(A,B); draw("$(l_1)$",l1); draw("$s_1$",(segment) l1, 2pt+red, marker(stickframe,markuniform(2,true))); /* View the definition of line bisector(segment,real) */ line bis=bisector((segment) l1); draw(bis,red); /* View the definition of void show(picture,line,pen) */ show(bis,grey); /* View the definition of point point(line,real) */ dot(point(bis,1.5)); draw(box(locate((-2,-2)),locate((2,2))),invisible);
|
|
| Figure 0026: fig0260.asy |
import geometry_dev; size(5cm,0); point M=(1,1); point N=(0.25,0.28); point P=(0.75,0.66); path g=origin--M; line l=line(origin,M); pen p=linewidth(5mm); draw(l,p); dot(N,p+red); dot(N,blue); dot(P,p+red); dot(P,blue); draw(box(origin,(1,1)),invisible); /* View the definition of bool @(point,line) */ write(N@l);// Return 'false' /* View the definition of bool onpath(picture,path,point,pen) */ write(onpath(g,N,p));// Return 'true' write(onpath(g,P,p));// Return 'false'
|
|
| Figure 0027: fig0270.asy |
import geometry_dev; size(8cm,0); currentcoordsys=cartesiansystem((0,0),i=(1,1),j=(-0.5,.75)); show("","$\vec{u}$", "$\vec{v}$", currentcoordsys, ipen=blue); show(defaultcoordsys); point A=(0,0); real R=2; /* View the definition of struct circle */ circle C=circle(A,R); draw(C,1.5mm+red); circle Cp=circle(point(defaultcoordsys,A),R); draw(Cp,0.75mm+blue); // One can draw in the 'currentcoordsys' a circle definided in // the 'defaultcoordsys' /* View the definition of path *(coordsys,path) */ draw(currentcoordsys*Cp, red+blue);
|
|
| Figure 0028: fig0275.asy |
import geometry_dev; size(10cm); // currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75)); // show(currentcoordsys); point A=(-1,0), B=(2,0), C=(0,2); draw(line(A,B), linewidth(bp)); draw(line(A,C), linewidth(bp)); draw(line(B,C), linewidth(bp)); /* View the definition of circle circle(point,point,point) */ circle cc=circle(A,B,C); draw(cc, blue); dot(cc.C, blue); /* View the definition of circle incircle(point,point,point) */ circle ic=incircle(A,B,C); draw(ic, red); dot(ic.C, red); /* View the definition of circle excircle(point,point,point) */ circle ec=excircle(A,B,C); /* View the definition of void clipdraw(picture,Label,path,align,pen,arrowbar,arrowbar,real,real,Label,marker) */ clipdraw(ec, green); dot(ec.C, green); ec=excircle(A,C,B); clipdraw(ec, green); dot(ec.C, green); ec=excircle(C,B,A); clipdraw(ec, green); dot(ec.C, green); dot("G",centroid(A,B,C),NE); // Enlarge the bounding box of the current picture // draw(box((-2.5,-3), (3.5,3.5)));
|
|
| Figure 0029: fig0280.asy |
import geometry_dev; size(8cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); show(currentcoordsys); point A=(1,1); dot("$A$",A,S,red); real R=2; circle C=circle(A,R); draw(C,Arrow); /* View the definition of ellipse *(transform,circle) */ ellipse el=xscale(2)*C; draw(el,blue,Arrow); // /* View the definition of transform xscale(real,point) */ ellipse el=xscale(2,A)*C; draw(el,red,Arrow);
|
|
| Figure 0030: fig0290.asy |
import geometry_dev; size(8cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); show(currentcoordsys); point A=(1,1); dot("$A$",A,S,red); real R=2; circle C=circle(A,R); draw(C,Arrow); /* View the definition of ellipse *(transform,circle) */ draw(scale(0.5)*C,red,Arrow); draw(scale(0.5,A)*C,2mm+0.8*blue); /* View the definition of circle /(explicit circle,real) */ draw(C/2,0.75mm+green,Arrow(4mm)); // Note that the point 'point(C,0)' is always at the same place relatively to 'C'. draw(rotateO(180)*C/2,0.8*yellow,Arrow);
|
|
| Figure 0031: fig0300.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); show(currentcoordsys); point A=(1,1); dot("$A$",A,S,red); real a=3, b=2; ellipse el=ellipse(A,a,b,0); draw(el,Arrow); /* View the definition of ellipse *(transform,ellipse) */ draw(scale(0.5)*el,red,Arrow); draw(scale(0.5,A)*el,2mm+0.8*blue); /* View the definition of ellipse /(ellipse,real) */ draw(el/2,0.75mm+green,Arrow(4mm)); // Note that the point 'point(el,0)' is always at the same place relatively to 'el'. draw(rotateO(135)*el/2,0.8*yellow,Arrow);
|
|
| Figure 0032: fig0310.asy |
import geometry_dev; size(10cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); show(currentcoordsys); point F=(0.25,0.5); dot("$F$",F,SW,red); // Enlarge the bounding box of the current picture draw(box(locate((-1.5,0)),locate((1,1))), invisible); line l=rotateO(10)*line((0,-0.4),(1,-0.4)); draw(l); /* View the definition of parabola parabola(point,line) */ parabola p=parabola(F,l); draw(p,linewidth(3mm)); /* View the definition of parabola parabola(point,point) */ draw(parabola(p.F,p.V),2mm+red); /* View the definition of parabola parabola(point,real,real) */ draw(parabola(p.F,p.a,p.angle),1mm+green);
|
|
| Figure 0033: fig0320.asy |
import geometry_dev; size(10cm); point F=(2,-1.5); dot("$F$",F,N,red); // Enlarge the bounding box of the current picture. draw(box((-1,-1),(3,1.5)),dashed);//,invisible); parabola p=parabola(F,0.2,90); // Define the bounding box to draw the parabola. // Try finalbounds(); to determine the final bounding box. p.bmin=(-0.75,-0.4); p.bmax=(2.75,0.75); draw(box(p.bmin,p.bmax),red); draw(p,dashed);/* Defered drawing to adjust the path to the final bounding box.*/ draw((path)p,red); /* The path of 'p' is restricted to the box whose the corners are p.bmin, p.bmax.*/
|
|
| Figure 0034: fig0325.asy |
import geometry_dev; size(10cm,0); // currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); // show(currentcoordsys); point F1=(1,0); point F2=(4,1); dot("$F_1$",F1,W); dot("$F_2$",F2); // Enlarge the bounding box of the current picture draw(box((0,-2), (5,4)), invisible); /* View the definition of hyperbola hyperbola(point,point,real,bool) */ hyperbola h=hyperbola(F1, F2, 0.9); draw(h, linewidth(3mm)); draw(h.A1, grey); draw(h.A2, grey); draw(h.D1); draw(h.D2); /* View the definition of hyperbola hyperbola(point,real,real,real) */ draw(hyperbola(h.C, h.a, h.b, h.angle), 2mm+green); /* View the definition of hyperbola hyperbola(bqe) */ draw(hyperbola(equation(h)), 1mm+red); /* View the definition of hyperbola conj(hyperbola) */ hyperbola ch=conj(h); draw(ch, blue); draw(ch.A1, 0.5blue); draw(ch.A2, 0.5blue); draw(ch.D1); draw(ch.D2); dot("${V'}_1$", ch.V1, NE); dot("${V'}_2$", ch.V2, SW); dot("${F'}_1$", ch.F1, S); dot("${F'}_2$", ch.F2, N); dot("$V_1$", h.V1, 2E, linewidth(2mm)); dot("$V_2$", h.V2, 2W, linewidth(2mm));
|
|
| Figure 0035: fig0330.asy |
import geometry_dev; size(8cm,0); currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,.75)); show(currentcoordsys, xpen=invisible); point A=(-1,0); point B=(0.5,-3sin(2)); dot("$A$",A,S,red); dot("$B$",B,N,red); line l=line(A,B); circle c=circle((0,-sqrt(2)/2),exp(1)); draw(l); draw(c); /* View the definition of point[] intersectionpoints(line,circle) */ point[] inter=intersectionpoints(l,c);