## Asymptote Generalities – fig1640

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 17 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

size(6cm,0);

path apath=(0,0)..(1,1)..(2,.5){dir(0)};

draw(subpath(apath,0,length(apath)/2),1pt+.8red,EndPenMargin);
draw(subpath(apath,length(apath)/2,length(apath)),1pt+.8blue,BeginPenMargin);

Étiquettes : , ,

## Asymptote Generalities – fig1650

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 18 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

size(10cm,0);
texpreamble("\usepackage{amsmath}");

path p = (0,0)..(1,1)..(2,.5){dir(0)};
real al    = arclength(p);
real l     = length(p);
pair pt    = point(p,l/2);
pair apt   = arcpoint(p,al/2);

draw(p);
draw(subpath(p,0,arctime(p,al/2)),blue);
dot(pt,red);
dot(apt,blue);

arrow("$\frac{\text{lenght(p)}}{2}$",pt,SSE,1cm);
arrow("$\frac{\text{arclenght(p)}}{2}$",apt,SSW,1cm);
label("\small The sizes of the blue path and the black path are equal",(1,.25));

Étiquettes : , ,

## Asymptote Generalities – fig1660

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 19 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

size(10cm,0);

path apath=(0,0)..(1,1)..(2,.5){dir(0)};
real l=length(apath);
real step=l/15;

for(real i=0; i<l-step; i+=step)
draw(subpath(apath,i,i+step),4bp+(i/l*red+(l-i)/l*blue),PenMargins);
draw(apath);

Étiquettes : , , ,

## Asymptote Generalities – fig1670

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 20 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

size(10cm,0);

path apath=(0,0)..(1,1)..(2,.5){dir(0)};
real l=arclength(apath);
real step=l/15;

path arcpath(path apath, real t1, real t2)
{
return subpath(apath, arctime(apath,t1), arctime(apath,t2));
}

for(real i=0; i<l-step; i+=step)
draw(arcpath(apath,i,i+step),4bp+(i/l*red+(l-i)/l*blue),PenMargins);
draw(apath);

Étiquettes : , , , ,

## Asymptote Generalities – fig1680

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 21 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(5cm);

string text="A text along a curve";
path p=(0,0)..(1,1)..(2,0.5){dir(0)};
int n=length(text);
real at=0;
real step=arclength(p)/n;

for (int i=0; i<n; ++i){
real t=arctime(p,at);
label(rotate(degrees(angle(dir(p,t),false)))*scale(3)*baseline(substr(text,i,1)),point(p,t));
at += step;
}

draw(p,lightgrey);

Étiquettes : , , ,

## Asymptote Generalities – fig1690

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 22 h 39 min

 (Compiled with Asymptote version 2.14svn-r5318)

import labelpath;

unitsize(5cm);
string text="\Huge A text along a curve";
path p=(0,0)..(1,1)..(2,0.5){dir(0)};

labelpath(text,p);
draw(p, lightgrey);

Étiquettes : , , , ,