Asymptote using geometry.asy – fig0010

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import geometry;

/* 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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0020

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import geometry;

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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0030

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import geometry;

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,real) */
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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0040

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import geometry;

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,real) */
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,real) */
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'.

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0050

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0060

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0070

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0080

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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));

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0090

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0100

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0110

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);
}

Étiquettes : , ,

Asymptote using geometry.asy – fig0120

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0130

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0140

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

 (Compiled with Asymptote version 2.14svn-r5318)

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);
}

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0150

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(12cm,0);
import geometry;
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));

Étiquettes : , , ,

Asymptote using geometry.asy – fig0160

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(10cm);
import geometry;
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){
}

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0170

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(1cm);
import geometry;
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);

Étiquettes : , , , , , , ,

Asymptote using geometry.asy – fig0180

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(1cm);
import geometry;
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);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0190

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(1cm);
import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0200

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(12cm);
import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0210

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(12cm);
import geometry;

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);

/* View the definition of void markangle(picture,Label,int,real,real,line,line,arrowbar,pen,filltype,margin,marker) */
markangle(2,l2,l1,0.8*green,StickIntervalMarker(i=1,n=2));

l2,l1,0.8*blue);

markangle(reverse(l2),reverse(l1),Arrow,StickIntervalMarker(i=1,n=2));

/* View the definition of real sharpdegrees(line,line) */
markangle((string) sharpdegrees(l2,l1),
reverse(l2),l1,Arrow,red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0220

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(2cm);
import geometry;

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);

/* View the definition of void markangle(picture,Label,int,real,real,line,line,arrowbar,pen,filltype,margin,marker) */
markangle(2, l1, l2, StickIntervalMarker(2,2,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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0230

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0240

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0250

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(2cm);
import geometry;
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);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0260

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;

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'

Étiquettes : , , ,

Asymptote using geometry.asy – fig0270

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0280

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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)));

Étiquettes : , , ,

Asymptote using geometry.asy – fig0290

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0300

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0310

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0320

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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);

Étiquettes : , ,

Asymptote using geometry.asy – fig0330

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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.*/

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0340

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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));

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0350

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
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((point)(0,-sqrt(2)/2),exp(1));
draw(l);
draw(c);

/* View the definition of point[] intersectionpoints(line,circle) */
point[] inter=intersectionpoints(l,c);
dot("$M$", inter[0], 2S, red);
dot("$N$", inter[1], 2N+0.5W, red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0360

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

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);
ellipse el=ellipse((0,-sqrt(2)/2),3,2,90);
draw(l);
draw(el,Arrow);

/* View the definition of point[] intersectionpoints(line,ellipse) */
point[] inter=intersectionpoints(l,el);
dot("$M$", inter[0], 4N+2W, red);
dot("$N$", inter[1], 2S+0.5E, red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0370

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

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

point A=(-1,-1);
point B=(2,1);
dot("$A$",A,S,red);
dot("$B$",B,N,red);

line l=line(A,B);
draw(l);

point F=(2,-1.5);
dot("$F$",F,N);

parabola p=parabola(F,0.2,110);
draw(p);

/* View the definition of point[] intersectionpoints(line,parabola) */
point[] inter=intersectionpoints(l,p);
dot("$M$", inter[0], 2N+E, red);
dot("$N$", inter[1], S+2E, red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0380

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

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

// Enlarge the bounding box of the current picture
draw(box((-6,-5), (10,2)), invisible);

point A=(-2,-2);
point B=(2,-3);
dot("$A$",A,N,red);
dot("$B$",B,S,red);

line l=line(A,B);
draw(l);

point C=(2,-1.5);
dot("$C$",C,N);

hyperbola h=hyperbola(C,sqrt(2),sqrt(2)/2,0);
draw(h);

/* View the definition of point[] intersectionpoints(line,hyperbola) */
point[] inter=intersectionpoints(l,h);
dot("$M$", inter[0], 2N+E, red);
dot("$N$", inter[1], 2S+E, red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0390

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;

size(8cm,0);

currentcoordsys=cartesiansystem((0,0),i=(1,1),j=(-0.5,.75));
show(currentcoordsys);

point A=(-0.5,.75);
point B=(1,1);
dot("$A$",A,SE);
dot("$B$",B,NW);

line l=line(A,B,false);
line ll=hline()+B;

circle c=circle((point)(0.5,0.5),2);
draw(l^^ll);
draw(complementary(l),dashed+grey);
draw(c);

dotfactor*=2;

/* View the definition of point[] intersectionpoints(line,circle) */
dot(intersectionpoints(l,c),red);
dot(intersectionpoints(ll,c),red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0400

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;

size(8cm,0);

currentcoordsys=cartesiansystem((0,0),i=(1,1),j=(-0.5,.75));
show(currentcoordsys);

point A=(-0.5,.75);
point B=(1,1);
dot("$A$",A,SE);
dot("$B$",B,NW);

line l=line(A,B,false);
line ll=hline()+B;

ellipse el=ellipse((point)(0.5,0.5),3,2);
draw(l^^ll);
draw(complementary(l),dashed+grey);
draw(el);

dotfactor*=2;

/* View the definition of point[] intersectionpoints(line,ellipse) */
dot(intersectionpoints(l,el),red);
dot(intersectionpoints(ll,el),red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0410

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

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

point A=(-1,-1);
point B=(2,1);
dot("$A$",A,S,red);
dot("$B$",B,NW,red);

line l=line(A,B,false);
line ll=hline()+0.5*B;
draw(l^^ll);
draw(complementary(l),dashed+grey);

point F=(2,-1.5);
dot("$F$",F,N);

parabola p=parabola(F,0.2,110);
draw(p);

dotfactor*=2;

/* View the definition of point[] intersectionpoints(line,parabola) */
dot(intersectionpoints(l,p), red);
dot(intersectionpoints(ll,p), red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0420

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(-1,-1);
point B=(0.75,0.5);
dot("$A$",A,NW,red);
dot("$B$",B,N,red);

circle c1=circle(A,1.5);
circle c2=circle(B,2);
draw(c1^^c2);

/* View the definition of line radicalline(circle,circle) */
/* View the definition of point radicalcenter(circle,circle) */

dotfactor*=2;

/* View the definition of point[] intersectionpoints(circle,circle) */
point[] inter=intersectionpoints(c1,c2);
dot("$M$", inter[0], 2SW, red);
dot("$N$", inter[1], 2NE, red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0430

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point C=(0,0);
point Cp=(0.5,0.5);
dot("$C$",C,NW,red);
dot("$C'$",Cp,N,red);

ellipse el1=ellipse(C,2,1);
ellipse el2=ellipse(Cp,3,1,40);
draw(el1^^el2);

dotfactor*=2;

/* View the definition of point[] intersectionpoints(ellipse,ellipse) */
point[] inter=intersectionpoints(el1,el2);
dot(inter);

Étiquettes : , ,

Asymptote using geometry.asy – fig0440

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(-1,-1);
point B=(0.75,0.5);
dot("$A$",A,NW,red);
dot("$B$",B,N,red);

circle c1=circle(A,1.5);
circle c2=circle(B,2);
draw(c1^^c2);

point[] inter=intersectionpoints(c1,c2);
dot("$M$", inter[0], 2NW, red);

/* View the definition of line tangent(circle,point) */
draw(tangent(c1,inter[0]), grey);
draw(tangent(c2,inter[0]), grey);

/* View the definition of line tangent(circle,abscissa) */
draw(tangent(c2,angabscissa(135)), grey);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0450

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

point c2=(13,5);
real r=4, R=abs(c2)-r;

circle[] C={circle(origin, 4), circle(c2,R)};
draw(C[0]^^C[1], blue);

segment s=segment(origin, c2);
draw(s, red, dot);

/* View the definition of point curpoint(line,real) */
point T=curpoint(s,r/(r-R)*abs(c2));
dot(T);
/* View the definition of line tangents(circle,point) */
line[] tgt=tangents(C[1], T);
draw(tgt);

point[][] t= new point[2][2];
for (int i=0; i < 2 ; ++i)
for (int j=0; j < 2; ++j) {
/* View the definition of point[] intersectionpoints(line,circle) */
t[i][j]=intersectionpoints(C[i],tgt[j])[0];
draw(C[i].C--t[i][j], dot);
markrightangle(T, t[i][j], C[i].C, size=(i == 0 ? 2mm : 0));
}

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0460

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(-1,-1);
point B=(0.75,0.5);
dot("$A$",A,NW,red);
dot("$B$",B,N,red);

ellipse el1=ellipse(A,2,1.5);
ellipse el2=ellipse(B,3,2);
draw(el1);
draw(el2,Arrow);

point[] inter=intersectionpoints(el1,el2);
dot("$M$", inter[0], 2NW, red);

/* View the definition of line[] tangents(ellipse,point) */
draw(tangents(el1,inter[0]), grey);
draw(tangents(el2,inter[0]), grey);

/* View the definition of line tangent(ellipse,abscissa) */
draw(tangent(el2,angabscissa(90)), grey);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0470

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm);

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

point F1=(0,0);
dot("$F1$",F1,NW);
point F2=(-0.25,0.5);
dot("$F2$",F2,SE);

parabola p=parabola(F1, 0.1, 120);
draw(p, bp+red);

parabola pp=parabola(F2, 0.06, 280);
draw(pp, bp+blue);

abscissa x=angabscissa(180);
dot(point(p,x));
/* View the definition of line tangent(parabola,abscissa) */
draw(tangent(p,x), 0.8*red);

point[] P=intersectionpoints(p,pp);
dot(P);

/* View the definition of line[] tangents(parabola,point) */
draw(tangents(p,P[0]), 0.8*red);
draw(tangents(pp,P[0]), 0.8*blue);

// Enlarge the bounding box
draw(box((-1,-0.4), (0.5,0.6)),invisible);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0480

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

point C=(4,2);
dot("$C$",C,E+NE,red);

hyperbola h=hyperbola(C,1.5,1,-20);
draw(h, linewidth(bp));

/* View the definition of line tangent(hyperbola,abscissa) */
line l=tangent(h,angabscissa(85));
draw(l, grey);
dot(intersectionpoints(h,l));

l=tangent(h,angabscissa(0,fromCenter));
draw(l, grey);
dot(intersectionpoints(h,l));

// Enlarge the bounding box of the current picture.
draw(box((-1,-0.5), (9,4)), invisible);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0490

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm);

point C=(0,0);
dot(C);

hyperbola[] h;
h[0]=hyperbola(C,2,2);
h[1]=hyperbola(C,1.5,1);

draw(h[0], 2bp+0.8*red);
draw(h[1], 2bp+0.8*blue);

point[] P=intersectionpoints(h[0],h[1]);

line[] l;
for (int i=0; i < P.length; ++i) {
for (int j=0; j < 2; ++j) {
/* View the definition of line[] tangents(hyperbola,point) */
l=tangents(h[j],P[i]);
draw(l[0], j == 0 ? red : blue);
}
}

dot(P, yellow);

// Enlarge the bounding box of the current picture.
draw(box((-4,-3), (4,3)), invisible);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0500

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(2.5,-1);
point B=A+(3,1);
dot("$A$",A,SW);
dot("$B$",B,2N+0.5W);

circle c1=circle(A,1.5);
draw(c1);

/* View the definition of line[] tangents(circle,point) */
line[] tgt=tangents(c1,B);
draw(tgt,red);
/* View the definition of circle circle(point,point) */
draw(circle(B,A),grey);

// dot(intersectionpoints(c1,circle(B,A)),red);
for (int i=0; i<tgt.length; ++i) {
dot(intersectionpoints(c1,tgt[i]),2mm+red);
}

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig0510

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(2.5,-1);
dot("$A$",A,SW);
ellipse el1=ellipse(A,2,1,10);
draw(el1);

circle C=circle(A,3);
draw(C);
for (int i=0; i < 360; i+=90) {

point B=point(C,angabscissa(i));
dot("$B$",B,locate(unit(B-A)));

line[] tgt=tangents(el1,B);
draw(tgt,0.8*red);

for (int i=0; i < tgt.length; ++i) {
dot(intersectionpoints(el1,tgt[i]),blue);
}

}

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0520

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point F=(0,0);
dot("$F$", F, SW);
parabola p=parabola(F, 0.1, 30);
draw(p);

point C=shift(2*(p.V-p.F))*p.V;
circle cle=circle(C, 0.2);
draw(cle);
for (int i=0; i < 360; i+=90) {

point M=point(cle, angabscissa(i));
dot("$M$", M, locate(unit(M-C)));

line[] tgt=tangents(p, M);
draw(tgt, 0.8*red);

for (int i=0; i < tgt.length; ++i) {
dot(intersectionpoints(p, tgt[i]), blue);
}
}

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0530

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point A=(-0.5,-0.5);
point B=(1,0.5);
point C=(0.5,1);
dot("$A$",A,SW);
dot("$B$",B,2N+0.5W);
dot("$C$",C,2N+0.5W);

/* View the definition of circle circle(point,point,point) */
circle c1=circle(A,B,C);
dot("$\Omega$",c1.C,N);
draw(c1);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0540

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point A=(3.5,1),
B=(1.75,3),
C=(-1,2),
D=(-1.5,-0.5),
F=(1.5,-1);

dot("$A$",A);
dot("$B$",B,N);
dot("$C$",C,NW);
dot("$D$",D,SW);
dot("$F$",F,SE);

/* View the definition of ellipse ellipse(point,point,point,point,point) */
ellipse el=ellipse(A,B,C,D,F);
draw(el);

dot("$F_1$",el.F1,NW);
dot("$F_2$",el.F2,NW);

/* View the definition of coordsys canonicalcartesiansystem(ellipse) */
coordsys R=canonicalcartesiansystem(el);
show("$C$", "$\vec{u}$", "$\vec{v}$", R, xpen=blue);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0550

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

// Enlarge the bounding box of the current picture
draw(box(locate((-1,-1.5)),locate((2,1))),invisible);

point A=(0,-1);
point B=(1.25,1);
point C=(-1,0.5);

dot("$A$",A,SW,red);
dot("$B$",B,E,red);
dot("$C$",C,N,red);

line l=rotateO(20)*line((0,0),(1,0));
/* View the definition of parabola parabola(point,point,point,line) */
parabola p=parabola(A,B,C,l);
draw(p,blue);
draw(p.D,blue);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0560

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(0,0), B=(2,1);

line l=line(A,B);
draw(l);
show(l, blue);

/* View the definition of point relpoint(line,real) */
point P=relpoint(l, 1);
dot("relpoint(l, 1)", P, 2E,linewidth(2mm));
/* View the definition of abscissa relabscissa(line,point) */
dot(point(l,relabscissa(l,P)), red);

/* View the definition of point curpoint(line,real) */
point P=curpoint(l, 1);
dot("curpoint(l, 1)", P, SE, blue+2mm);
/* View the definition of abscissa curabscissa(line,point) */
dot(point(l,curabscissa(l,P)), yellow);

point P=relpoint(l, 2);
dot("relpoint(l, 2)", P, NW,linewidth(2mm));
dot(point(l,relabscissa(l,P)), red);

point P=curpoint(l, 2);
dot("curpoint(l, 2)", P, NW, blue+2mm);
dot(point(l,curabscissa(l,P)), yellow);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0570

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

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

circle C=circle(A,2);
draw(C);
/* View the definition of void distance(picture pic,Label,point,point,bool,real,pen,pen,arrow) */
distance("$R=2$",A,point(C,0),0);

/* View the definition of point relpoint(explicit circle,real) */
dot("relpoint(C, 0)",relpoint(C,0),E);

/* View the definition of point point(circle,abscissa) */
dot("relpoint(C, 0.25)",point(C,Relative(0.25)),NW);
// point(C,Relative(0.25)) can be replaced by relpoint(C,0.25) OR point(C,relabscissa(0.25))

dot("relpoint(C, 0.5)",relpoint(C,0.5),W);
dot("relpoint(C, 0.75)",relpoint(C,0.75),SE);
dot("relpoint(C, 1.125)",relpoint(C,1.125),NE);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0580

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(2,-1.5);
dot("$A$",A,S,red);

ellipse el=ellipse(A,3,1,20);
draw(el);

/* View the definition of point relpoint(explicit ellipse,real) */
dot("relpoint(el, 0)",relpoint(el,0),E);

/* View the definition of point point(ellipse,abscissa) */
dot("relpoint(el, 0.25)",point(el,Relative(0.25)),NW);
// point(el,Relative(0.25)) can be replaced by relpoint(el,0.25) OR point(el,relabscissa(0.25))

dot("relpoint(el, 0.5)",relpoint(el,0.5),W);
dot("relpoint(el, 0.75)",relpoint(el,0.75),SE);
dot("relpoint(el, 1.125)",relpoint(el,1.125),NW);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0590

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point F=(2,-1.5);
dot("$F$",F,N,red);

// Enlarge the bounding box of the current picture.
draw(box((-0.5,-0.4),(4,1.5)),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.5,-0.4);
p.bmax=(3.7,0.75);

draw(p,dashed); /* Defered drawing to adjust the path to the final
bounding box.*/

draw((path)p); /* The path of 'p' is restricted to the box whose
the corners are p.bmin, p.bmax.*/

/* View the definition of point relpoint(explicit parabola,real) */
dot("relpoint(p, 0)",relpoint(p,0),SE);

/* View the definition of point point(parabola,abscissa) */
dot("relpoint(p, 0.25)",point(p,Relative(0.25)),NE);
// point(p,Relative(0.25)) can be replaced by relpoint(p,0.25) OR point(p,relabscissa(0.25))

dot("relpoint(p, -0.5)",relpoint(p,-0.5),W);
dot("relpoint(p, -1)",relpoint(p,-1),W);
dot("relpoint(p, 1)",relpoint(p,1),E);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0600

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(11cm,0);

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

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

circle C=circle(A,2);
draw(C);
distance("$R=2$",A,point(C,0),0);

/* View the definition of pair curpoint(explicit circle,real) */
dot("curpoint(C, pi/2)", curpoint(C,pi/2),NE);

dot("curpoint(C, -pi/2)", curpoint(C,-pi/2));

/* View the definition of abscissa curabscissa(real) */
dot("curpoint(C, pi)", point(C,curabscissa(pi)),NW);
// point(C,curabscissa(pi)) can be replaced by curpoint(C,pi)

dot("curpoint(C, 2*pi)", curpoint(C,2*pi),W);
dot("curpoint(C, 3*pi)", curpoint(C,3*pi),SE);
dot("curpoint(C, 4.25*pi)", curpoint(C,4.25*pi),E);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0610

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(4,2);

ellipse el=ellipse(A,3,2,30);
draw(el);
dot("$C$",el.C,S,red);

/* View the definition of pair curpoint(explicit ellipse,real) */
dot("curpoint(el, 0)", curpoint(el,0), E);

real L=arclength(el);

dot("curpoint(el, L/8)", curpoint(el,L/8),NW);

dot("curpoint(el, -L/8)", curpoint(el,-L/8));

/* View the definition of abscissa curabscissa(real) */
dot("point(el,curabscissa(L/4))", point(el,curabscissa(L/4)),NW);
// point(el,curabscissa(pi)) can be replaced by curpoint(el,pi)

dot("curpoint(el, L/2)", curpoint(el,L/2),W);
dot("curpoint(el, 3*L/4)", curpoint(el,3*L/4),SE);
dot("curpoint(el, 9*L/8)", curpoint(el,9*L/8),4N+4W);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0620

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

point F=(1,-1.5);
dot("$F$",F,N,red);

parabola p=parabola(F,0.2,110);

draw(p);

/* View the definition of point curpoint(explicit parabola,real) */
dot("curpoint(p, 0)",curpoint(p,0),SE);

/* View the definition of point point(parabola,abscissa) */
dot("curpoint(p, 0.5)",point(p,curabscissa(0.5)),NE);
// point(p,curabscissa(0.5)) can be replaced by curpoint(p,0.5)

dot("curpoint(p, -0.5)",curpoint(p,-0.5),W);
dot("curpoint(p, -2)",curpoint(p,-2),W);
dot("curpoint(p, 2)",curpoint(p,2),E);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0630

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(11cm,0);

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

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

circle C=circle(A,2);
draw(C);
distance("$R=2$",A,point(C,0),0);

/* View the definition of point angpoint(explicit circle,real) */
dot("angpoint(C, 90)", angpoint(C,90),NW);

/* View the definition of abscissa angabscissa(real,polarconicroutine) */
dot("angpoint(C, 180)", point(C,angabscissa(180)), W);
// point(C,angabscissa(180)) can be replaced by angpoint(C,180)

dot("angpoint(C, 270)", angpoint(C,270),SE);
dot("angpoint(C, 405)", angpoint(C,405),NE);
dot("angpoint(C, -45)", angpoint(C,-45),SE);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0640

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(4,2);

ellipse el=ellipse(A,3,2,20);
draw(el);
dot("$C$",el.C,2W,red);

dot("$F_1$",el.F1,S);
dot("$F_2$",el.F2,S);

/* View the definition of point angpoint(explicit ellipse,real,polarconicroutine) */
point P=angpoint(el, 0);
dot("angpoint(el, 0)", P,E);
draw(el.F1--P);

point P=angpoint(el, 90);
dot("angpoint(el, 90)", P,NW);
draw(el.F1--P);

point P=angpoint(el, 90, fromCenter);
dot("angpoint(el,90,fromCenter)", P,NW);
draw(el.C--P);

/* View the definition of abscissa angabscissa(real,polarconicroutine) */
dot("angpoint(el, 180)", point(el,angabscissa(180)), W);
// point(el,angabscissa(180)) can be replaced by angpoint(el,180)

dot("angpoint(el, 270)", angpoint(el,270),SE);
dot("angpoint(el, 370)", angpoint(el,370),NE);
dot("angpoint(el, -45)", angpoint(el,-45),SE);

point P=angpoint(el, -45, fromCenter);
dot("angpoint(el,-45,fromCenter)", P,S);
draw(el.C--P);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0650

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(15cm,0);

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

point A=(4,2);

ellipse el=ellipse(A,3,2,20);
draw(el);
dot("$C$",el.C,S,red);

dot("$F_1$",el.F1,S);
dot("$F_2$",el.F2,S);

///////////////////////////////////////
currentpolarconicroutine=fromCenter;//
/////////////////////////////////////

/* View the definition of point angpoint(explicit ellipse,real,polarconicroutine) */
point P=angpoint(el, 0);
dot("angpoint(el, 0)", P,E);
draw(el.C--P);

point P=angpoint(el, 90);
dot("angpoint(el, 90)", P,NW);
draw(el.C--P);

point P=angpoint(el, 90, fromFocus);
dot("angpoint(el,90,fromFocus)", P,NW);
draw(el.F1--P);

/* View the definition of abscissa angabscissa(real,polarconicroutine) */
dot("angpoint(el, 180)", point(el,angabscissa(180)), W);

dot("angpoint(el, 370)", angpoint(el,370),NE);
dot("angpoint(el, -45)", angpoint(el,-45),SE);

point P=angpoint(el, -45, fromFocus);
dot("angpoint(el,-45,fromFocus)", P,S);
draw(el.F1--P);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0660

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

point F=(1,0.5);
dot("$F$",F,E,red);

parabola p=parabola(F,0.2,110);

draw(p);

coordsys R=currentcoordsys;
show(R);

coordsys Rp=canonicalcartesiansystem(p);
show(Label("$O'$",align=NW+W,blue), Label("$\vec{u}$",blue), Label("$\vec{v}$",blue), Rp, ipen=blue);

/* View the definition of point angpoint(explicit parabola,real) */
dot("angpoint(p, 180)",angpoint(p,180),SE+E);

/* View the definition of point point(parabola,abscissa) */
point P=point(p,angabscissa(55));
// point(p,angbscissa(0.5)) can be replaced by angpoint(p,0.5)
dot("angpoint(p, 55)",P,NE);

segment s=segment(F,P);
draw(s);
line l=line(F,F+Rp.i);
markangle("$"+(string)degrees(l,s)+"^\circ$",l,(line)s,Arrow);

dot("angpoint(p, -45)",angpoint(p,-45),W);
dot("angpoint(p, -55)",angpoint(p,-55),W);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0670

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm);

point C=(4,2);
dot("$C$",C,E+NE,red);

hyperbola h=hyperbola(C,1.5,1,-20);
draw(h, linewidth(bp));

coordsys R=currentcoordsys;
show(R);

coordsys Rp=canonicalcartesiansystem(h);
show(Label("$O'$",align=SW,blue), Label("$\vec{u}$",blue), Label("$\vec{v}$",blue), Rp, ipen=blue);

/* View the definition of point angpoint(explicit hyperbola,real,polarconicroutine) */
dot(rotate(70)*"angpoint(h, 180)",angpoint(h,180),E);

/* View the definition of point point(hyperbola,abscissa) */
point P=point(h,angabscissa(55));
// point(h,angbscissa(0.5)) can be replaced by angpoint(h,0.5)
dot("angpoint(h, 55)",P,SE);

/* View the definition of path arcfromfocus(conic,real,real,int,bool) */
draw(arcfromfocus(h,55,180), bp+red);

segment s=segment(h.F1,P);
draw(s);
dot("$F_1$",h.F1,N+NW);
line l=line(h.F1,h.F1-Rp.i);
markangle("$55^\circ$",l,(line)s,Arrow);

dot("angpoint(p, -50)",angpoint(h,-50),W);
dot("angpoint(p, -55)",angpoint(h,-55),NE);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0680

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

 (Compiled with Asymptote version 1.92svn-r4817)

import geometry;
size(12cm);

// currentcoordsys=cartesiansystem((0,0),i=(1,0.5),j=(-0.5,.75));
coordsys R=currentcoordsys;
show(R);

point C=(4,2);
dot("$C$", C, NW, red);

hyperbola h=hyperbola(C, 2, 1.5, -10);
draw(h);

///////////////////////////////////////
currentpolarconicroutine=fromCenter;//
/////////////////////////////////////

coordsys Rp=canonicalcartesiansystem(h);
show(Label("$O'$", align=SW,blue),
Label("$\vec{u}$",blue),
Label("$\vec{v}$",blue),
Rp, ipen=blue);

/* View the definition of point angpoint(explicit hyperbola,real,polarconicroutine) */
dot("angpoint(h, 0)", angpoint(h,0), E+NE);
dot(rotate(80)*"angpoint(h, 180)", angpoint(h,180),E);

draw(arcfromcenter(h,0,30), bp+red);

// point(p,angbscissa(150)) can be replaced by angpoint(p,150)
dot("angpoint(h, 150)", point(h, angabscissa(150)), E);

point P=point(h, angabscissa(210));
dot("angpoint(h, 210)", P, E);

point P=angpoint(h, 30);
dot("angpoint(h, 30)", P, E);

segment s=segment(C, P);
draw(s);
markangle("$30^\circ$", Ox(Rp),(line) s, radius=1.5cm, Arrow);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0690

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(4,2);
dot("$A$",A,S,red);

real R=2;
circle C=circle(A,R);
draw(C,linewidth(1mm));
draw("$R="+(string)R+"$", A--point(C,0), N, Arrows);

/* View the definition of point point(explicit circle,explicit real) */
dot("point(C, 15)", point(C,15),2E,3mm+blue);

/* View the definition of abscissa nodabscissa(real) */
dot("point(C, 40)",
point(C,nodabscissa(40)),
2W,3mm+blue);
// point(C,nodabscissa(40)) can be replaced by point(C,40)

/* View the definition of int circlenodesnumber(real) */
dot("point(C, 3*circlenodesnumber(R)/4)",
point(C, 3*circlenodesnumber(R)/4), S, 3mm+blue);

dot((path)C, yellow);

write(length((path)C));

Étiquettes : , , ,

Asymptote using geometry.asy – fig0700

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(4,2);

real a=2, b=3;
ellipse el=ellipse(A,a,b);

dot("$C$",el.C,N,red);
draw(el,linewidth(1mm));

/* View the definition of point point(explicit ellipse,explicit real) */
dot("point(el, 0)", point(el,0),N,3mm+blue);

dot("point(el, 15)", point(el,15),2W,3mm+blue);

/* View the definition of abscissa nodabscissa(real) */
dot("point(el, 40)",
point(el,nodabscissa(40)),
2W,3mm+blue);
// point(el,nodabscissa(40)) can be replaced by point(el,40)

/* View the definition of int circlenodesnumber(real) */
dot("point(el, 3*circlenodesnumber(max(a,b))/4)",
point(el, 3*circlenodesnumber(max(a,b))/4), S, 3mm+blue);

dot((path)el, yellow);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0710

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm);

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

point F=(2,-1.5);
dot("$F$",F,N,red);

// Enlarge the bounding box of the current picture.
draw(box((-0.5,-0.4),(4,1.5)),invisible);

parabola p=parabola(F,0.2,90);

draw(p,bp+dashed); /* Defered drawing to adjust the path to the final
bounding box.*/

// Define the bounding box to draw the parabola.
// Try finalbounds(); to determine the final bounding box.
p.bmin=(-0.5,-0.4);
p.bmax=(3.7,0.75);
draw((path)p, linewidth(bp)); /* The path of 'p' is restricted to the box whose
the corners are p.bmin, p.bmax.*/

/* View the definition of point point(explicit parabola,explicit real) */
dot("point(p, 0)", point(p,0),2E,3mm+blue);

dot("point(p, 15)", point(p,15),2W,3mm+blue);

/* View the definition of abscissa nodabscissa(real) */
dot("point(p, 40)", point(p,nodabscissa(40)), 2W,3mm+blue);
// point(p,nodabscissa(40)) can be replaced by point(p,40)

/* View the definition of real[] bangles(picture,parabola) */
real[] bg=bangles(p);

/* View the definition of int parabolanodesnumber(parabola,real,real) */
dot("point(p, parabolanodesnumber(p,bg[0],bg[1])/2)",
point(p, parabolanodesnumber(p,bg[0],bg[1])/2), S, 3mm+blue);

dot((path)p, yellow);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0720

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm);

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

point C=(3,2);
dot("$C$", C, N, red);

// Enlarge the bounding box of the current picture.
draw(box((0,0),(5,4.5)), invisible);

hyperbola h=hyperbola(C, 1, 2);

draw(h, bp+dashed); /* Defered drawing to adjust the path to the final
bounding box.*/

// Define the bounding box to draw the hyperbola.
// Try finalbounds(); to determine the final bounding box.
h.bmin=(0,0.5); h.bmax=(5,4);
draw((path)h, linewidth(bp)); /* The path of 'p' is restricted to the box whose
the corners are p.bmin, p.bmax.*/

/* View the definition of point point(explicit hyperbola,explicit real) */
dot("point(h, 0)", point(h,0), 2W, 3mm+blue);

dot("point(h, 15)", point(h,15), 2W, 3mm+blue);

/* View the definition of abscissa nodabscissa(real) */
dot("point(h, 40)", point(h,nodabscissa(40)), 2W,3mm+blue);
// point(h,nodabscissa(40)) can be replaced by point(h,40)

/* View the definition of real[] bangles(picture,hyperbola) */
real[][] bg=bangles(h);

dot((path)h, yellow);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0730

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(2cm);

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

point A=(-2,2);
dot("$A$",A,S);
point B=A+(cos(0.5),cos(1));
dot("$B$",B,S);

circle c=circle(A,2);
draw(c);

line l=line(A,B);
draw(l);
point M=intersectionpoints(l,c)[0];
point P=intersectionpoints(l,c)[1];

/* View the definition of void dot(picture,Label,explicit point,align,string,pen) */
dot("",M,2E,linewidth(2mm));
dot("$M$",M,2W);
dot("",P,2E,linewidth(2mm));
dot("$P$",P,2W);

pair p=A-(4,2.5);
transform t=shift((0,-0.3));
transform T=shift((4,0));
real x;

/* View the definition of abscissa angabscissa(circle,point) */
x=angabscissa(c,M).x;
label("angabscissa(c,M).x=$"+(string)x+"^\circ$",p,E);
dot(angpoint(c,x),1mm+red);
x=angabscissa(c,P).x;
label("angabscissa(c,P).x=$"+(string)x+"^\circ$",T*p,E);
dot(angpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa curabscissa(circle,point) */
x=curabscissa(c,M).x;
dot(curpoint(c,x),1mm+red);
label("curabscissa(c,M).x="+(string)x,p,E);
x=curabscissa(c,P).x;
label("curabscissa(c,P).x="+(string)x,T*p,E);
dot(curpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa nodabscissa(circle,point) */
x=nodabscissa(c,M).x;
label("nodabscissa(c,M).x="+(string)x,p,E);
dot(point(c,x),1mm+red);
x=nodabscissa(c,P).x;
label("nodabscissa(c,P).x="+(string)x,T*p,E);
dot(point(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa relabscissa(circle,point) */
x=relabscissa(c,M).x;
label("relabscissa(c,M).x="+(string)x,p,E);
dot(relpoint(c,x),1mm+red);
x=relabscissa(c,P).x;
label("relabscissa(c,P).x="+(string)x,T*p,E);
dot(relpoint(c,x),1mm+red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0740

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(2cm);

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

point A=(-2,2);
dot("$A$",A,S);
point B=A+(cos(0.5),cos(1));
dot("$B$",B,S);

ellipse el=ellipse(A,3,2,0);
draw(el);
line l=line(A,B);
draw(l);
point M=intersectionpoints(l,el)[0];
point P=intersectionpoints(l,el)[1];

/* View the definition of void dot(picture,Label,explicit point,align,string,pen) */
dot("",M,2E,linewidth(2mm));
dot("$M$",M,2W);
dot("",P,2E);
dot("$P$",P,2W,linewidth(2mm));

pair p=A-(4,2.5);
transform t=shift((0,-0.3));
transform T=shift((4,0));
real x;

/* View the definition of abscissa angabscissa(ellipse,point,polarconicroutine) */
x=angabscissa(el,M).x;
label("angabscissa(el,M).x=$"+(string)x+"^\circ$",p,E);
dot(angpoint(el,x),1mm+red);
x=angabscissa(el,P).x;
label("angabscissa(el,P).x=$"+(string)x+"^\circ$",T*p,E);
dot(angpoint(el,x),1mm+red);

p=t*p;
/* View the definition of abscissa curabscissa(ellipse,point) */
x=curabscissa(el,M).x;
dot(curpoint(el,x),1mm+red);
label("curabscissa(el,M).x="+(string)x,p,E);
x=curabscissa(el,P).x;
label("curabscissa(el,P).x="+(string)x,T*p,E);
dot(curpoint(el,x),1mm+red);

p=t*p;
/* View the definition of abscissa nodabscissa(ellipse,point) */
x=nodabscissa(el,M).x;
label("nodabscissa(el,M).x="+(string)x,p,E);
dot(point(el,x),1mm+red);
x=nodabscissa(el,P).x;
label("nodabscissa(el,P).x="+(string)x,T*p,E);
dot(point(el,x),1mm+red);

p=t*p;
/* View the definition of abscissa relabscissa(ellipse,point) */
x=relabscissa(el,M).x;
label("relabscissa(el,M).x="+(string)x,p,E);
dot(relpoint(el,x),1mm+red);
x=relabscissa(el,P).x;
label("relabscissa(el,P).x="+(string)x,T*p,E);
dot(relpoint(el,x),1mm+red);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0750

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(2cm);

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

point A=(-2.5,2);
dot("$A$",A,S);
point B=A+(cos(0.5),cos(1));
dot("$B$",B,S);

point F=(-1,0.5);
dot("$F$",F,NW);

parabola pb=parabola(F,0.2,130);
draw(pb);
line l=line(A,B);
draw(l);
point M=intersectionpoints(l,pb)[0];
point P=intersectionpoints(l,pb)[1];

/* View the definition of void dot(picture,Label,explicit point,align,string,pen) */
dot("",M,2E,linewidth(2mm));
dot("$M$",M,2W);
dot("",P,2E,linewidth(2mm));
dot("$P$",P,2W);

pair p=A-(4,2.5);
transform t=shift((0,-0.3));
transform T=shift((4,0));
real x;

/* View the definition of abscissa angabscissa(parabola,point) */
x=angabscissa(pb,M).x;
label("angabscissa(pb,M).x=$"+(string)x+"^\circ$",p,E);
dot(angpoint(pb,x),1mm+red);
x=angabscissa(pb,P).x;
label("angabscissa(pb,P).x=$"+(string)x+"^\circ$",T*p,E);
dot(angpoint(pb,x),1mm+red);

// p=t*p;
// /* View the definition of abscissa curabscissa(parabola,point) */
// x=curabscissa(pb,M).x;
// dot(curpoint(pb,x),1mm+red);
// label("curabscissa(pb,M).x="+(string)x,p,E);
// x=curabscissa(pb,P).x;
// label("curabscissa(pb,P).x="+(string)x,T*p,E);
// dot(curpoint(pb,x),1mm+red);

// p=t*p;
// /* View the definition of abscissa nodabscissa(parabola,point) */
// x=nodabscissa(pb,M).x;
// label("nodabscissa(pb,M).x="+(string)x,p,E);
// dot(point(pb,x),1mm+red);
// x=nodabscissa(pb,P).x;
// label("nodabscissa(pb,P).x="+(string)x,T*p,E);
// dot(point(pb,x),1mm+red);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0760

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// currentcoordsys=cartesiansystem((2,1),i=rotate(45)*(1,0),j=rotate(45)*(0,1));
// show(currentcoordsys);

conic co[];
co[0]=circle((point)(0,0),1);
/* View the definition of void draw(picture,Label,explicit conic,align,pen,arrowbar,arrowbar,margin,Label,marker) */
draw(co[0]);

co[1]=ellipse((point)(0,0),4,1);
draw(co[1]);

co[2]=parabola((0,0),1,90);
draw(co[2]);

hyperbola h=hyperbola((-1,0),(1,0),1.2,byvertices);
co[3]=h;
draw(co[3]);
draw(h.A1,grey);
draw(h.A2,grey);

dotfactor *= 1;

for (int i=0; i < 4; ++i) {
dot(intersectionpoints(h.A1,co[i]),blue);
dot(intersectionpoints(h.A2,co[i]),blue);
for (int j=i+1; j < 4; ++j)
/* View the definition of point[] intersectionpoints(conic,conic) */
dot(intersectionpoints(co[i],co[j]), red);
}

Étiquettes : , , , , , , ,

Asymptote using geometry.asy – fig0770

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm);

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

point A=(-1,0) ; dot("$A$",A,S);
point B=(1,1)  ; dot("$B$",B,S);
point C=(0,1)  ; dot("$C$",C,SW);
point D=(1,-1) ; dot("$D$",D,SW);

circle c=circle(origin(),2);

line l1=line(A,B); draw(l1);
line l2=line(C,D); draw(l2);

point[] J=intersectionpoints(l1,c);
point[] K=intersectionpoints(l2,c);

/* View the definition of arc arc(ellipse,point,point,bool) */
draw(arc(c,J[0],K[0]),1mm+0.8yellow);
draw(arc(c,K[0],J[1]),1mm+0.8red);
/* View the definition of arc arc(ellipse,abscissa,abscissa,bool) */
draw(arc(c,angabscissa(c,J[1]),angabscissa(c,K[1])),1mm+0.8blue);
draw(arc(c,angabscissa(c,K[1]),angabscissa(c,J[0])),1mm+0.8green);

dot("$J_0$",J[0],2W); dot("$J_1$",J[1],2N);
dot("$K_0$",K[0],2E) ; dot("$K_1$",K[1],2N+W);

Étiquettes : , , ,

Asymptote using geometry.asy – fig0780

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm);

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

point A=(-1,0) ; dot("$A$",A,S);
point B=(1,1)  ; dot("$B$",B,S);
point C=(0,1)  ; dot("$C$",C,SW);
point D=(1,-1) ; dot("$D$",D,SW);

ellipse el=ellipse((point)(0,0.5),2,1);

line l1=line(A,B); draw(l1);
line l2=line(C,D); draw(l2);

point[] J=intersectionpoints(l1,el);
point[] K=intersectionpoints(l2,el);

/* View the definition of arc arc(ellipse,point,point,bool) */
draw(arc(el, J[0],K[0]), 1mm+0.8yellow);
draw(arc(el, K[0],J[1]), 1mm+0.8red);
/* View the definition of arc arc(ellipse,abscissa,abscissa,bool) */
draw(arc(el,angabscissa(el,J[1]), angabscissa(el,K[1])), 1mm+0.8blue);
draw(arc(el,angabscissa(el,K[1]), angabscissa(el,J[0])), 1mm+0.8green);

dot("$J_0$", J[0], 2N); dot("$J_1$", J[1], 2S);
dot("$K_0$", K[0], 2NE) ; dot("$K_1$", K[1], 2dir(-35));

Étiquettes : , , ,

Asymptote using geometry.asy – fig0790

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(6cm);

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

point A=(-1,0);
point B=(3,-1);
point C=(0,1);

circle cle=circle(A,C,B);
draw(cle,linewidth(2mm));

draw(arc(cle,A,B), dotsize()+red);
draw(arc(cle,A,B,CW), dotsize()+blue);

dot(Label("$A$", black), A, 1.5NW, white);
dot(Label("$B$", black), B, E, white);
dot(Label("$C$", black), C, NW, white);

Étiquettes : , ,

Asymptote using geometry.asy – fig0800

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,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,0.8red);

real R=2;
/* View the definition of struct arc */
arc C=arc(circle(A,R),45,180);/* View the definition of arc arc(ellipse,real,real,polarconicroutine,bool) */
draw(C,Arrow);

/* View the definition of arc complementary(arc) */
draw(complementary(C),dashed+grey,Arrow(position=Relative(0.75)));

/* View the definition of arc *(transform,explicit arc) */
arc Cp=scale(0.5,A)*C;
draw(Cp,0.8red,Arrow);

arc Cp=scale(-0.5,A)*C;
draw(Cp,0.8blue,Arrow);

arc Cp=scale(1.1,A)*C;
/* View the definition of arc reverse(arc) */
draw(reverse(Cp),0.8*yellow,Arrow);

arc Cp=scale(0.9,A)*C;
draw(rotate(225,A)*Cp,0.8green,Arrow);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0810

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,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,0.8red);

real R=2;
/* View the definition of struct arc */
arc C=arc(ellipse(A,2R,R),45,180,fromCenter);
draw(C,Arrow);

/* View the definition of arc complementary(arc) */
draw(complementary(C),dashed+grey,Arrow(position=Relative(0.75)));

/* View the definition of arc *(transform,explicit arc) */
arc Cp=scale(0.5,A)*C;
draw(Cp,0.8red,Arrow);

arc Cp=scale(-0.5,A)*C;
draw(Cp,0.8blue,Arrow);

arc Cp=scale(1.1,A)*C;
/* View the definition of arc reverse(arc) */
draw(reverse(Cp),0.8*yellow,Arrow);

arc Cp=scale(0.9,A)*C;
draw(rotate(225,A)*Cp,0.8green,Arrow);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0820

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,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,red);

real R=2;
arc C=arc(circle(A,R), 45, 210);
draw(C,linewidth(4mm));

/* View the definition of void markarc(picture,Label,int,real,real,arc,arrowbar,pen,pen,margin,marker) */
markarc(format("%0g",degrees(C)), C, Arrow);

/* View the definition of arc *(real, explicit arc) */
draw(0.5*C,2mm+yellow);

arc Cp=C/3;
draw(Cp,1mm+blue);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0830

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point A=(1,1);
dot("$A$", A, NW, red);

real R=2;
arc C=arc(circle(A,R), 45, 210, CW);
draw(C,linewidth(4mm));

/* View the definition of void markarc(picture,Label,int,real,real,arc,arrowbar,pen,pen,margin,marker) */

/* View the definition of arc *(real, explicit arc) */
draw(0.5*C, 2mm+yellow);

arc Cp=C/3;
draw(Cp, 1mm+blue);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0840

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point C=(1,1);
dot("$C$", C, NE, red);

real R=2;
arc a=arc(ellipse(C,R,R/2), 90, 0, fromCenter);
draw(a, linewidth(4mm));

/* View the definition of void markarc(picture,Label,int,real,real,arc,arrowbar,pen,pen,margin,marker) */

/* View the definition of arc *(real, explicit arc) */
draw(0.5*a, 2mm+yellow);

arc ap=a/3;
draw(ap, 1mm+blue);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0850

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point C=(1,1);
dot("$C$", C, dir(30), red);

arc a=arc(ellipse(C,2,1,30), -45, 45);
draw(a, linewidth(4mm));
dot("$F_1$", a.el.F1, dir(210), red);

/* View the definition of void markarc(picture,Label,int,real,real,arc,arrowbar,pen,pen,margin,marker) */

/* View the definition of arc *(real, explicit arc) */
draw(0.5*a, 2mm+yellow);

arc ap=a/3;
draw(ap, 1mm+blue);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0860

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,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, red);

arc C=arc(circle(A,2), 45, 270);
draw(C, Arrow);

/* View the definition of real degrees(arc) */
write(degrees(C)); // Output is 225

draw(complementary(C), grey+dashed);
distance("$R=2$",A,point(C,0),0);

/* View the definition of point relpoint(arc,real) */
dot("relpoint(C, 0)", relpoint(C,0),E);

/* View the definition of point point(arc,abscissa) */
dot("relpoint(C, 0.25)", point(C,Relative(0.25)),N);// point(C,Relative(0.25)) is similar to relpoint(C,0.25)
dot("relpoint(C, -0.5)", relpoint(C,-0.5),E);
dot("relpoint(C, 0.5)",  relpoint(C,0.5),W);
dot("relpoint(C, 0.75)", relpoint(C,0.75),W);
dot("relpoint(C, 1.25)", relpoint(C,1.25),E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0870

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,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, red);

arc C=arc(ellipse(A,2,1,45), 45, 270, fromCenter);
// arc C=arc(ellipse(A,2,1), 45, -45);

draw(C, Arrow);
draw(complementary(C), grey+dashed);
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point relpoint(arc,real) */
dot("relpoint(C, 0)", relpoint(C,0),W);

/* View the definition of point point(arc,abscissa) */
dot("relpoint(C, 0.25)", point(C,Relative(0.25)),W);// point(C,Relative(0.25)) is similar to relpoint(C,0.25)
dot("relpoint(C, -0.5)", relpoint(C,-0.5),E);
dot("relpoint(C, 0.5)",  relpoint(C,0.5),W);
dot("relpoint(C, 0.75)", relpoint(C,0.75),SE);
dot("relpoint(C, 1.25)", relpoint(C,1.25),E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0880

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(3.5,0.5);
dot("$A$",A,S,red);

arc C=arc(circle(A,2),45,270,CCW);
draw(C,Arrow);
draw(complementary(C),grey+dashed);
/* View the definition of void distance(picture pic,Label,point,point,bool,real,pen,pen,arrow) */
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point curpoint(arc,real) */
dot("curpoint(C, 0)", curpoint(C,0),E);
dot("curpoint(C, pi/2)", curpoint(C,pi/2),N);
dot("curpoint(C, -pi/2)", curpoint(C,-pi/2));

// dot("curpoint(C, pi)", point(C,curabscissa(pi)),W); // OR curpoint(C,pi)
dot("curpoint(C, pi)", curpoint(C,pi),W);

dot("curpoint(C, 2*pi)", curpoint(C,2*pi),SW);
dot("curpoint(C, 3*pi)", curpoint(C,3*pi),E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0890

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(3.5,0.5);
dot("$A$",A,SW,red);

arc C=arc(ellipse(A,2,1,-30),90,270,fromCenter,CCW);
real l=arclength(C);

draw(C,Arrow);
draw(complementary(C),grey+dashed);
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point curpoint(arc,real) */
dot("curpoint(C, 0)", curpoint(C,0),E);
dot("curpoint(C, l/4)", curpoint(C,l/4),0.5N+E);
dot("curpoint(C, -l/4)", curpoint(C,-l/4));

dot("curpoint(C, l/2)", point(C,curabscissa(l/2)),W); // point(C,curabscissa(l/2)) is similar to curpoint(C,pi)
dot("curpoint(C, l)", curpoint(C,l), SW);
dot("curpoint(C, 3*l/2)", curpoint(C,3*l/2),E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0900

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(3.5,0.5);
dot("$A$", A, S, red);

arc C=arc(circle(A,2), 60, 270, CCW);
draw(C,Arrow);
draw(complementary(C), grey+dashed);
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point angpoint(arc,real) */
dot("angpoint(C, 90)",  angpoint(C,90), W);

dot("angpoint(C, 180)", point(C,angabscissa(180)), SW); // point(C,angabscissa(180)) is similar to angpoint(C,180)

dot("angpoint(C, 270)", angpoint(C,270), E);
dot("angpoint(C, -45)", angpoint(C,-45), E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0910

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(12cm,0);

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

point A=(3.5,0.5);
dot("$A$", A, S, red);

/* View the definition of arc reverse(arc) */
arc C=reverse(arc(ellipse(A,2,1,20), 45, 270, fromCenter));
draw(C,Arrow);
draw(complementary(C), grey+dashed);
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point angpoint(arc,real) */
dot("angpoint(C, 90)",  angpoint(C,90), SW);

dot("angpoint(C, 180)", point(C,angabscissa(180)), NW); // point(C,angabscissa(180)) is similar to angpoint(C,180)

dot("angpoint(C, 270)", angpoint(C,270), E);
dot("angpoint(C, -45)", angpoint(C,-45), E);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0920

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(1.5cm);

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

real R=2;
point A=(3.5,1.5);

dot("$A$",A,S,red);

arc C=arc(circle(A,2), 45, 270);
draw(C,Arrow);
draw(complementary(C),grey+dashed);
distance("$R=2$",A,point(C,0),0);

/* View the definition of point point(arc,real) */
dot("point(C, 15)", point(C,15), 2N, 3mm+blue);

dot("point(C, 30)",
point(C,nodabscissa(30)), // OR point(C,40)
2W,3mm+blue);

/* View the definition of int arcnodesnumber(explicit arc) */
dot(Label("point(C, 3*arcnodesnumber(R)/4)",UnFill),
point(C, 3*arcnodesnumber(C)/4), 2E, 3mm+blue);

dot((path)C, yellow);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0930

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(1.5cm);

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

real R=2;
point A=(3.5,1.5);

dot("$A$",A,S,red);

arc C=arc(ellipse(A,2,1,45), 45, 270, fromCenter);
draw(C,Arrow);
draw(complementary(C),grey+dashed);
distance("$R=2$",A,point(C.el,0),0);

/* View the definition of point point(arc,real) */
dot("point(C, 15)", point(C,15), W, 3mm+blue);

dot("point(C, 30)",
point(C,nodabscissa(30)), // OR point(C,40)
S,3mm+blue);

/* View the definition of int arcnodesnumber(explicit arc) */
dot(Label("point(C, 3*arcnodesnumber(R)/4)",UnFill),
point(C, 3*arcnodesnumber(C)/4), 2E, 3mm+blue);

dot((path)C, yellow);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0940

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(2cm);
linemargin=0.5cm;

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

point A=(3.5,0.75);
dot("$A$",A,S);
point B=A+(cos(0.5),cos(1));
dot("$B$",B,S);

arc c=arc(circle(A,2), 45, 270, CCW);
arc cc=complementary(c);
draw(c,Arrow);
draw(cc,dashed+grey);

line l=line(A,B);
draw(l);
point M=intersectionpoints(l,c)[0];
point P=intersectionpoints(l,cc)[0];

dot("", M, 2E);
dot("$M$", M, 2W, linewidth(2mm));
dot("", P, 2E);
dot("$P$", P, 2W, linewidth(2mm));
dot("$O$", point(c,0), SE);

point p=A-(4,2.5);
transform t=shift((0,-0.3));
transform T=shift((4,0));
real x;

/* View the definition of abscissa angabscissa(arc,point) */
x=angabscissa(c,M).x;
label("angabscissa(c,M).x=$"+(string)x+"^\circ$",p,E);
dot(angpoint(c,x),1mm+red);
x=angabscissa(c,P).x;
label("angabscissa(c,P).x=$"+(string)x+"^\circ$",T*p,E);
dot(angpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa curabscissa(arc,point) */
x=curabscissa(c,M).x;
dot(curpoint(c,x),1mm+red);
label("curabscissa(c,M).x="+(string)x,p,E);
x=curabscissa(c,P).x;
label("curabscissa(c,P).x="+(string)x,T*p,E);
dot(curpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa nodabscissa(arc,point) */
x=nodabscissa(c,M).x;
label("nodabscissa(c,M).x="+(string)x,p,E);
dot(point(c,x),1mm+red);
label("nodabscissa(c,P).x= \scriptsize{ERROR (point is not on the arc!)}",T*p,E);

p=t*p;
/* View the definition of abscissa relabscissa(arc,point) */
x=relabscissa(c,M).x;
label("relabscissa(c,M).x="+(string)x,p,E);
dot(relpoint(c,x),1mm+red);
x=relabscissa(c,P).x;
label("relabscissa(c,P).x="+(string)x,T*p,E);
dot(relpoint(c,x),1mm+red);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0950

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
unitsize(2cm);
linemargin=0.5cm;

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

point A=(3.5,0.75);
dot("$A$",A,S);
point B=A+(cos(0.5),cos(1));
dot("$B$",B,S);

arc c=rotate(45,B)*xscale(2,A)*arc(circle(A,2), 45, 270, CCW);
arc cc=complementary(c);
draw(c,Arrow);
draw(cc,dashed+grey);

line l=line(A,B);
draw(l);
point M=intersectionpoints(l,c)[0];
point P=intersectionpoints(l,cc)[0];

dot("", M, 2E);
dot("$M$", M, 2W, linewidth(2mm));
dot("", P, 2E);
dot("$P$", P, 2W, linewidth(2mm));
dot("$O$", point(c,0), SE);

point p=A-(4,2.5);
transform t=shift((0,-0.3));
transform T=shift((4,0));
real x;

/* View the definition of abscissa angabscissa(arc,point) */
x=angabscissa(c,M).x;
label("angabscissa(c,M).x=$"+(string)x+"^\circ$",p,E);
dot(angpoint(c,x),1mm+red);
x=angabscissa(c,P).x;
label("angabscissa(c,P).x=$"+(string)x+"^\circ$",T*p,E);
dot(angpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa curabscissa(arc,point) */
x=curabscissa(c,M).x;
dot(curpoint(c,x),1mm+red);
label("curabscissa(c,M).x="+(string)x,p,E);
x=curabscissa(c,P).x;
label("curabscissa(c,P).x="+(string)x,T*p,E);
dot(curpoint(c,x),1mm+red);

p=t*p;
/* View the definition of abscissa nodabscissa(arc,point) */
x=nodabscissa(c,M).x;
label("nodabscissa(c,M).x="+(string)x,p,E);
dot(point(c,x),1mm+red);
label("nodabscissa(c,P).x= \scriptsize{ERROR (point is not on the arc!)}",T*p,E);

p=t*p;
/* View the definition of abscissa relabscissa(arc,point) */
x=relabscissa(c,M).x;
label("relabscissa(c,M).x="+(string)x,p,E);
dot(relpoint(c,x),1mm+red);
x=relabscissa(c,P).x;
label("relabscissa(c,P).x="+(string)x,T*p,E);
dot(relpoint(c,x),1mm+red);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig0960

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm);

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

point A=(-1,0) ; dot("$A$",A,S);
point B=(1,1)  ; dot("$B$",B,S);
point C=(0,0)  ;
point D=(1,-1) ; dot("$D$",D,SW);

arc c=arc(circle(C,2), 0, 270);
draw(complementary(c),dashed+grey);

line l1=line(A,B); draw(l1);
line l2=line(C,D); draw(l2);

point[] J=intersectionpoints(l1,c);
point[] K=intersectionpoints(l2,c);

/* View the definition of arc arc(explicit arc,point,point) */
draw(arc(c,K[0],J[0]),2mm+0.8yellow);
draw(arc(c,J[1],K[0]),2mm+0.8red);
/* View the definition of arc arc(explicit arc,abscissa,abscissa) */
draw(arc(c,relabscissa(c,J[0]),relabscissa(1)),2mm+0.8green);
draw(arc(c,relabscissa(0),relabscissa(c,J[1])),2mm+0.8blue);

dot("$J_0$",J[0],2NW);
dot("$J_1$",J[1],2N);
dot("$K_0$",K[0],2W);

draw(c, 1mm+white);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0970

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm);

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

point A=(-1,0) ; dot("$A$",A,S);
point B=(1,1)  ; dot("$B$",B,S);
point C=(0,0)  ;
point D=(1,-1) ; dot("$D$",D,SW);

arc c=arc(ellipse(C,2,1,20), 0, 270);
draw(complementary(c),dashed+grey);

line l1=line(A,B); draw(l1);
line l2=line(C,D); draw(l2);

point[] J=intersectionpoints(l1,c);
point[] K=intersectionpoints(l2,c);

/* View the definition of arc arc(explicit arc,point,point) */
draw(arc(c,J[0],K[0]),2mm+0.8yellow);
draw(arc(c,K[0],J[1]),2mm+0.8red);
/* View the definition of arc arc(explicit arc,abscissa,abscissa) */
draw(arc(c,relabscissa(c,J[1]),relabscissa(1)),2mm+0.8green);
draw(arc(c,relabscissa(0),relabscissa(c,J[0])),2mm+0.8blue);

dot("$J_0$",J[0],2N);
dot("$J_1$",J[1],N+2W);
dot("$K_0$",K[0],2N);

draw(c, 1mm+white);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig0980

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

 (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

 (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

 (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 : , , , , ,

Asymptote using geometry.asy – fig1010

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

real R=2;

point A=(1,1);
dot("$A$", A, S, red);
point B=A+(2,1);
dot("$B$", B, N, blue);

arc a=arc(circle(A,R), -40, 180);
arc b=arc(circle(B,R), -45, 220);
line l=line(A,B);

draw(a,red);
draw(b,blue);
draw(l);

/* View the definition of point[] intersectionpoints(arc,arc) */
point[] inter=intersectionpoints(a,b);
dot(inter);

/* View the definition of point[] intersectionpoints(line,arc) */
point[] inter=intersectionpoints(l,a);
dot(inter);

point[] inter=intersectionpoints(l,b);
dot(inter);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig1020

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

real R=2;

point A=(1,1);
dot("$A$", A, S, red);
point B=A+(2,1);
dot("$B$", B, N, blue);

arc a=arc(ellipse(A,R,R/2), -40, 180);
arc b=arc(ellipse(B,R,R/2), -45, 220);

line l=line(A,B);

draw(a,red);
draw(b,blue);
draw(l);

/* View the definition of point[] intersectionpoints(arc,arc) */
point[] inter=intersectionpoints(a,b);
dot(inter);

/* View the definition of point[] intersectionpoints(line,arc) */
point[] inter=intersectionpoints(l,a);
dot(inter);

point[] inter=intersectionpoints(l,b);
dot(inter);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig1030

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

real R=2;

point A=(1,1.5);
dot("$A$",A,S,red);
point B=A+(2,1);
dot("$B$",B,S,blue);

arc a=arc(circle(A,R),-40,180);
arc b=arc(circle(B,R),-45,220);

draw(a,red);
draw(b,blue);

point M=intersectionpoints(a,b)[0];
dot(M);

/* View the definition of line tangent(explicit arc,point) */
draw(tangent(a,M), grey);
draw(tangent(b,M), grey);

/* View the definition of line tangent(explicit arc,abscissa) */
draw(tangent(a,angabscissa(45)), grey);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig1040

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

real R=2;

point A=(1,1.5);
dot("$A$",A,S,red);
point B=A+(2.5,1);
dot("$B$",B,E,blue);

arc a=arc(ellipse(A,R,R/2,30),-40,180);
// ellispenodesnumberfactor=400;
arc b=arc(ellipse(B,2R,R/2,-10),-30,180);

draw(a,red);
draw(b,blue);

point M=intersectionpoints(a,b)[0];
dot(M);

/* View the definition of line tangent(explicit arc,point) */
draw(tangent(a,M), grey);
draw(tangent(b,M), grey);

/* View the definition of line tangent(explicit arc,abscissa) */
draw(tangent(a,angabscissa(45)), grey);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig1050

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

point A=(0.25,0.25);
point B=A+(1,0.25);
dot("$A$",A,S,red);
dot("$B$",B,N,red);

segment s=segment(A,B);
line bis=bisector(s);

draw(s,StickIntervalMarker(2,2));
draw(bis);

/* View the definition of path compassmark(pair,pair,real,real) */
draw(compassmark(A, point(bis,0.75), position=0.25,angle=25), grey);
draw(compassmark(B, point(bis,0.75), position=0.75,angle=25), grey);

/* View the definition of point point(line,real) */
draw(compassmark(A, point(bis,0.25), position=0.5,angle=15), grey);
draw(compassmark(B, point(bis,0.25), position=0.5,angle=15), grey);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig1060

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

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

point A=(1,2);
point B=A+(2,0);
dot("$A$",A,0.25S+2W,red);
dot("$B$",B,0.25S+2E,red);

for (int i=0; i < 2; ++i) {
real a=(i == 0) ? 60 : -100;
/* View the definition of point arcsubtendedcenter(point,point,real) */
dot(arcsubtendedcenter(A,B,a),2mm+blue);

point arccenter=arcsubtendedcenter(A,B,a/2);
dot(arccenter,2mm+red);

/* View the definition of arc arcsubtended(point,point,real) */
arc arcsubtended=arcsubtended(A,B,a);
draw(arcsubtended,blue);

arc arc=arcsubtended(A,B,a/2);
draw(arc,red);

point M=relpoint(arcsubtended,0.75);
dot(format("%0g",degrees(B-M)-degrees(A-M)),
M,(-1)^(i+1)*I*dir(arcsubtended,reltime(arcsubtended,0.6)));
draw(A--M--B,blue);

label(format("%0g",degrees(B-arccenter)-degrees(A-arccenter)),
arccenter,(-1)^(i+1)*S);
draw(A--arccenter--B,red);
}

Étiquettes : , ,

Asymptote using geometry.asy – fig1070

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

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

/* View the definition of struct mass */
mass A=mass((1,0),3);/* View the definition of mass mass(point,real) */

mass B=mass((0,1),sqrt(3));
point C=(0.25,0);

/* View the definition of void dot(picture,Label,mass,align,string,pen) */
dot("$\left(B;\sqrt{3}\right)$",B,N,format="");

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

/* View the definition of mass masscenter(... mass[]) */
dot("G",masscenter(A,B,mass(C)),S);

Étiquettes : , , ,

Asymptote using geometry.asy – fig1080

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;

size(10cm);

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

/* View the definition of triangle triangleabc(real,real,real,real,point) */
triangle t=triangleabc(3,4,5);
/* View the definition of void show(picture,Label,Label,Label,Label,Label,Label,triangle,pen,filltype) */
show(La="3", Lb="4", Lc="5",t);

Étiquettes : ,

Asymptote using geometry.asy – fig1090

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;

size(10cm);

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

/* View the definition of triangle triangleAbc(real,real,real,real,point) */
triangle t=triangleAbc(60,3,5,angle=90);
show(Lb="3", Lc="5",t);
markangle("$60^\circ$",t.B,t.A,t.C);

Étiquettes : , ,

Asymptote using geometry.asy – fig1100

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// show(currentcoordsys);

triangle t=triangle((-1,0), (2,0), (0,2));

drawline(t, linewidth(bp));
/* View the definition of void label(picture,Label,Label,Label,triangle,real,real,pen,filltype) */
label(t, alignFactor=4);

/* View the definition of triangle anticomplementary(triangle) */
triangle at=anticomplementary(t);
draw(at, bp+0.8green);
label("$A'$", "$B'$", "$C'$", at, blue);

draw(segment(at.AB), bp+0.8green, StickIntervalMarker(2,1));
draw(segment(at.BC), bp+0.8green, StickIntervalMarker(2,2));
draw(segment(at.CA), bp+0.8green, CrossIntervalMarker(2,3));

Étiquettes : , , , ,

Asymptote using geometry.asy – fig1110

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// show(currentcoordsys);

triangle t=triangle((-1,0), (2,0), (0,2));

/* View the definition of void drawline(picture,triangle,pen) */
drawline(t, linewidth(bp));
/* View the definition of void label(picture,Label,Label,Label,triangle,real,real,pen,filltype) */
label(t,alignFactor=4);

/* View the definition of circle circle(triangle) */
circle cc=circle(t);
draw(cc, 0.8blue);
dot(cc.C, blue);
/* View the definition of triangle tangential(triangle) */
triangle tgt=tangential(t);
draw(tgt, bp+0.8blue);
label("$A_1$", "$B_1$", "$C_1$", tgt, blue);

/* View the definition of circle incircle(triangle) */
circle ic=incircle(t);
draw(ic, 0.8red);
dot(ic.C, red);
triangle intouch=intouch(t);
draw(intouch, bp+0.8red);
label("$A_2$", "$B_2$", "$C_2$", intouch, red);

/* View the definition of circle excircle(side,triangle) */
circle ec=excircle(t.AB);
clipdraw(ec, 0.8green);
dot(ec.C, green);

ec=excircle(t.AC);
clipdraw(ec, 0.8green);
dot(ec.C, green);

ec=excircle(t.BC);
clipdraw(ec, 0.8green);
dot(ec.C, green);

/* View the definition of triangle extouch(triangle) */
triangle ext=extouch(t);
draw(ext, bp+0.8green);
label("$A_3$", "$B_3$", "$C_3$", ext, green);

/* View the definition of point extouch(side) */
dot(extouch(t.AB), 0.8*green);
dot(extouch(t.BC), 0.8*green);
dot(extouch(t.CA), 0.8*green);

/* View the definition of point intouch(side) */
dot(intouch(t.AB), 0.8*red);
dot(intouch(t.BC), 0.8*red);
dot(intouch(t.CA), 0.8*red);

// Enlarge the bounding box of the current picture
draw(box((-2.5,-3), (3.5,3.5)), invisible);

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig1120

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(10cm,0);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// show(currentcoordsys);

triangle t=triangle((-1,0), (2,0), (0,2));

drawline(t, linewidth(bp));
label(t,alignFactor=2, alignAngle=90);

/* View the definition of triangle symmedial(triangle) */
triangle st=symmedial(t);
draw(st, bp+0.8green);
label("$A'$", "$B'$", "$C'$", st, alignAngle=45, 0.8green);

/* View the definition of line median(vertex) */
line mA=median(t.VA);
draw(mA, blue);
dot("$M_A$",midpoint(t.BC), 1.5E, blue);
draw(segment(t.BC), bp+blue, StickIntervalMarker(2,2,blue));

/* View the definition of line bisector(vertex,real) */
line bA=bisector(t.VA);
draw(bA, grey);
/* View the definition of point bisectorpoint(side) */
dot("$B_A$", bisectorpoint(t.BC));

/* View the definition of line symmedian(vertex) */
line sA=symmedian(t.VA);
draw(sA, 0.8*green);

draw(symmedian(t.VB), 0.8*green);
draw(symmedian(t.VC), 0.8*green);

/* View the definition of point symmedian(triangle) */
point sP=symmedian(t);
dot(sP);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig1130

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// show(currentcoordsys);

triangle t=rotate(-20)*triangle((-1,0), (2,0), (0,2));
drawline(t, linewidth(bp));
label(t,alignFactor=4);

line bab=bisector(t.AB);
draw(bab, blue);
perpendicularmark(t.AB,bab,quarter=4);

line bac=bisector(t.AC);
draw(bac, blue);
perpendicularmark(t.AC,bac,quarter=4);

line bbc=bisector(t.BC);
draw(bbc, blue);
perpendicularmark(t.BC,bbc,quarter=4);

Étiquettes : , , , , ,

Asymptote using geometry.asy – fig1140

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm,0);

// currentcoordsys=cartesiansystem((2,1),i=(1,0.5),j=(-0.25,0.75));
// show(currentcoordsys);

triangle t=rotate(-20)*triangle((-1,0), (2,0), (0,2));
drawline(t, linewidth(bp));
label(t, alignAngle=90, alignFactor=2);

/* View the definition of point incenter(triangle) */
point incenter=incenter(t);

line ba=bisector(t.VA);
draw(ba, blue);
markangle((line) t.AB, (line) t.AC,StickIntervalMarker(i=2,n=1));

line bb=bisector(t.VB);
draw(bb, blue);
markangle((line) t.BC, (line) t.BA, radius=2cm, StickIntervalMarker(i=2,n=2));

line bc=bisector(t.VC);
draw(bc, blue);
markangle((line) t.CA, (line) t.CB, radius=1.5cm, StickIntervalMarker(i=2,n=3));

Étiquettes : , , , ,

Asymptote using geometry.asy – fig1150

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

 (Compiled with Asymptote version 2.14svn-r5318)

import geometry;
size(8cm);

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

dotfactor *=1.5;
triangle t=triangleabc(3,4,5);
drawline(t, linewidth(bp));
label(t, alignFactor=3);

line l=line((-1,-2), (1,0.5));
draw(l, 0.8*red);
/* View the definition of point[] intersectionpoints(triangle,line,bool) */
dot(intersectionpoints(t,l), 0.8*red);

circle C=2*circle(t);
draw(C, 0.8*blue);
/* View the definition of point[] intersectionpoints(triangle,conic,bool) */
dot(intersectionpoints(t,C, true), 0.8*blue);

Étiquettes : , , , ,

Asymptote using geometry.asy – fig1160

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(1cm);
import geometry;

point pA = (0,0);
point pB = (5,0);
point pC = (5,5);

dot(pA^^pB^^pC);
draw(pA--pB--pC--cycle);

distance(Label("$x \; \mathrm{cm}$",align=S),pA,pB,3mm);
distance(Label("$y \; \mathrm{cm}$",align=E),pB,pC,3mm);
distance(Label("$z \; \mathrm{cm}$",align=I*dir(pA--pC)),pA,pC,-3mm);

shipout(bbox(xmargin=1mm,invisible));

Étiquettes : , , , , , ,

Asymptote using geometry.asy – fig1170

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

 (Compiled with Asymptote version 1.92svn-r4817)

import geometry; size(8cm);

inversion inv=inversion(1,(-4.5,0));
path g1=inv*line((-1,0),(-1,1)),
g2=inv*line((1,0),(1,1));
fill(g1,lightgrey); draw(g1,linewidth(bp));
unfill(g2); draw(g2,linewidth(bp));

int n=40;
for (int i=-n; i <= n; ++i) {
path g=inv*circle((point) (0,2*i),1);
fill(g,(1-abs(i)/n)*yellow);
draw(g,bp+red); draw(g,blue);
}
shipout(bbox(5mm,Fill(rgb(0.95,0.95,0.8))));

Étiquettes : , , , , ,