|
|
|
Figure 0001: fig0100.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
for (int i=-4; i<=4; ++i)
{
/* View the definition of string texfrac(int,int,string,bool,bool,bool,bool) */
label(texfrac(i,4), (i*cm,0));
label(texfrac(i,4,signin=true), (i*cm,-cm));
label(texfrac(i,4,factor="\pi"), (i*cm,-2cm));
label(texfrac(i,4,factor="\pi",factorin=false), (i*cm,-3cm));
label(texfrac(i,4,factor="\pi",signin=true,factorin=true), (i*cm,-4cm));
label(texfrac(i,4,factor="\pi",signin=true,factorin=false,displaystyle=true,zero=false), (i*cm,-5cm));
}
|
|
|
Figure 0002: fig0110.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
for (int i=-4; i<=4; ++i)
{
if(i != 0) {
/* View the definition of string texfrac(rational,string,bool,bool,bool,bool) */
label(texfrac(rational(1/i)), (i*cm,0));/* View the definition of rational rational(real,real) */
label(texfrac(rational(1/i),signin=true), (i*cm,-cm));
}
}
|
|
|
Figure 0003: fig0120.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
import stats;
size(8cm,0);
path cle=randompath(6);
draw(cle);
real x=.75;
/* View the definition of pair[] intersectionpointsv(path,real) */
pair[] pta = intersectionpointsv(cle,x);
draw(pta[0]--pta[pta.length-1]);
dot(pta,red);
real y=0;
/* View the definition of pair[] intersectionpointsh(path,real) */
pair[] ptb = intersectionpointsh(cle,y);
draw(ptb[0]--ptb[ptb.length-1]);
dot(ptb,blue);
|
|
|
Figure 0004: fig0130.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
import stats;
size(6cm,0);
path cle=randompath(7);
draw(cle);
pair a=(1,0), b=(0.75,.3);
dot("$A$",a);
dot("$B$",b);
/* View the definition of pair[] intersectionpoints(path,pair,pair) */
pair[] pta=intersectionpoints(cle,a,b);
/* View the definition of guide join(pair[],interpolate) */
draw(join(pta));
dot(pta,red);
|
|
|
Figure 0005: fig0140.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
import stats;
size(6cm,0);
path cle=randompath(7);
draw(cle);
pair a=(1,0), b=(0.75,.3);
dot("$A$",a);
dot("$B$",b);
/* View the definition of pair[] intersectionpointsd(path,pair,pair) */
pair[] pta=intersectionpointsd(cle,a,b);
draw(join(pta));
dot(pta,red);
|
|
|
Figure 0006: fig0150.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
path cle=yscale(3)*((0,0){N}..(1,0){N}..cycle);
draw(cle);
real x=.75;
/* View the definition of real[] intersectsv(path,real) */
real[] it=intersectsv(cle,x);
draw(subpath(cle,it[0],it[1]), 1mm+blue);
dot(intersectionpointsv(cle,x),red);
drawline((x,0),(x,1));
|
|
|
Figure 0007: fig0160.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
path cle=yscale(3)*((0,0){N}..(1,0){N}..cycle);
draw(cle);
real y=0.1;
/* View the definition of real[] intersectsh(path,real) */
real[] it=intersectsh(cle,y);
draw(subpath(cle,it[0],it[1]), 1mm+blue);
draw(subpath(cle,it[1],it[2]), 1mm+.8green);
dot(intersectionpointsh(cle,y),red);
drawline((0,y),(1,y));
|
|
|
Figure 0008: fig0170.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
path cle=yscale(3)*((0,0){N}..(1,0){N}..cycle);
draw(cle);
pair a=(0.2,.3), b=(.75,-.1);
dot("$A$",a,S);
dot("$B$",b,S);
draw(a--b);
real[] itd=intersections(cle,a,b);
draw(subpath(cle,itd[0],itd[2]), 1mm+.8blue);
draw(subpath(cle,itd[1],itd[2]), 1mm+.8green);
draw(subpath(cle,itd[2],length(cle)+itd[0]), 1mm+.8yellow);
/* View the definition of pair[] intersectionpoints(path,pair,pair) */
pair[] pta=intersectionpoints(cle,a,b);
dot(pta,red);
draw(pta[0]--a^^b--pta[2],red+dotted);
|
|
|
Figure 0009: fig0180.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(8cm,0);
path cle=yscale(3)*((0,0){N}..(1,0){N}..cycle);
draw(cle);
pair a=(0.2,.3), b=(.75,-.1);
dot("$A$",a,S);
dot("$B$",b,S);
draw(a--b);
real[] itd=intersections(cle,a,b);
draw(subpath(cle,itd[0],itd[2]), 1mm+.8blue);
draw(subpath(cle,itd[1],itd[2]), 1mm+.8green);
draw(subpath(cle,itd[2],length(cle)+itd[0]), 1mm+.8yellow);
/* View the definition of pair[] intersectionpointsd(path,pair,pair) */
pair[] pta=intersectionpointsd(cle,a,b);
dot(pta,red);
draw(pta[0]--a^^b--pta[1],red+dotted);
|
|
|
Figure 0010: fig0190.asy (Compiled with Asymptote version 1.86svn-r4626) |
import base_pi;
size(10cm,0);
pair O=(0,0);
path cle=rotate(30)*polygon(3);
pair a=point(cle,0),
b=point(cle,1),
c=point(cle,2);
/* View the definition of void drawline(picture,Label,pair,bool,pair,bool,align,pen,arrowbar,arrowbar,margin,Label,marker) */
drawline(O,false,a,true,.8red);
drawline(O,true,b,false,.8blue);
drawline(Label("$(d)$",Relative(.1)),O,true,c,true,.8green,Margin(5,5));
drawline(a,b);
drawline(b,c);
/* View the definition of void drawline(picture,Label,path,bool,bool,align,pen,arrowbar,arrowbar,margin,Label,marker) */
drawline(c--a);
dot("$O$",O,W);
dot("$A$",a,N);dot("$B$",b,NE);dot("$C$",c,SE);
// Enlarge the current picture bounding box (note that is can be differed at the end).
draw(box(-2a-(0,2b.y),2a+(0,2b.y)),invisible);
Dernière modification/Last modified: Sun Sep 20 18:48:36 CEST 2009
Philippe Ivaldi