## 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 – 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 : , , , , , ,

## Official Asymptote example – dimension

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 12 h 57 min

 (Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */

size(12cm,0);

void distance(picture pic=currentpicture, pair A, pair B, Label L="", real n=0,
pen p=currentpen)
{
real d=3mm;
path g=A--B;
transform T=shift(-n*d*unit(B-A)*I);
pic.add(new void(frame f, transform t) {
picture opic;
path G=T*t*g;
draw(opic,Label(L,Center,UnFill(1)),G,p,Arrows(NoFill),Bars,PenMargins);
});
distance(A,B,"$\ell$",1);