Asymptote using trembling.asy – fig0010

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 2 h 24 min

Figure 0001

One can use the routine tremble in order to deform a specific path.

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
size(8cm);

path cle=unitcircle;

/* View the definition of path tremble(path,real,real,real,real) */
path tcle=tremble(cle,frequency=0.25,random=1);
draw(tcle);

path tri=(-1,-0.5)--(1,-0.5)--(0,0.75)--cycle;
path ttri=tremble(tri,frequency=0.5,random=1.5);
draw(ttri);

shipout(bbox(3mm,invisible));

Étiquettes : , ,


Asymptote using trembling.asy – fig0020

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 3 h 24 min

Figure 0002

Using the routine startTrembling, all drawn paths are distorted.

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
size(8cm);

/* View the definition of void startTrembling(real,real,real,real,bool */
startTrembling();

draw(unitcircle);
draw((-1,-0.5)--(1,-0.5)--(0,0.75)--cycle);

shipout(bbox(3mm,invisible));

Étiquettes : , ,


Asymptote using trembling.asy – fig0030

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 4 h 24 min

Figure 0003

When trembling is enabled with the routine startTrembling, all (most ?) doted points become "magnetic" automatically. So, if a path passes through a magnetized point with an numerous precision defined by magneticRadius (unit is bp in postscript coordinates), the resulting distorted path will also pass through the point.

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling();

size(8cm);

triangle T=triangleabc(6,7,8);
draw(T,dot);
draw(circle(T));

Étiquettes : , ,


Asymptote using trembling.asy – fig0040

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 5 h 24 min

Figure 0004

One can disabled this feature setting the parameter magnetizePoints to false.

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling(magnetizePoints=false);

size(8cm);

triangle T=triangleabc(6,7,8);
draw(T,dot);
draw(circle(T));

Étiquettes : , ,


Asymptote using trembling.asy – fig0050

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 6 h 24 min

Figure 0005

One can magnetize non dotted points with the routines void magnetize(...triangle[]) and void magnetize(...pair[]).

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling();

size(8cm);

triangle T=triangleabc(6,7,8);

draw(T);
magnetize(T);/* View the definition of void magnetize(...triangle[]) */
draw(circle(T));

Étiquettes : ,


Asymptote using trembling.asy – fig0060

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 7 h 24 min

Figure 0006

Here an other example with the incircle of a triangle.
Further examples follow...

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling(angle=6, random=10);

size(8cm);

triangle T=triangleabc(6,7,8);
dot(intouch(T));

draw(T);
draw(incircle(T), 0.8*red);

Étiquettes : , , ,


Asymptote using trembling.asy – fig0070

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 8 h 24 min

Figure 0007
(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling(angle=6, frequency=1, random=10);

size(8cm);

triangle T=triangleabc(6,6,6);

draw(T, dot);
draw(bisector(T.AB)^^bisector(T.AC)^^bisector(T.BC), 0.8*red);

addMargins(1cm,1cm);

Étiquettes : , , , ,


Asymptote using trembling.asy – fig0080

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 9 h 24 min

Figure 0008
(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
startTrembling(angle=6, frequency=1);

size(8cm);

triangle T=triangleabc(6,6,6);
magnetize(centroid(T));/* View the definition of void magnetize(...pair[]) */
magnetize(T);

draw(T, dot);
draw(bisector(T.AB)^^bisector(T.AC)^^bisector(T.BC), 0.8*red);

addMargins(1cm,1cm);

Étiquettes : , , , , ,


Asymptote using trembling.asy – fig0090

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 10 h 24 min

Figure 0009
(Compiled with Asymptote version 1.87svn-r4652)
    
/*From Mathematex*/
unitsize(1cm);
import trembling;
import base_pi; // for rotatedLabel.

startTrembling();

point pA = (0,0);
point pB = (0,4);
point pC = pB+6*(rotate(35)*unit(pA-pB));
point pD = pC+4*(rotate(-112)*unit(pB-pC));
point pE = pD+4*(rotate(-78)*unit(pC-pD));
point pFi = rotate(35,pE)*pD;

dot(Label("$A$",align=SE),pA);
dot(Label("$B$",align=NW),pB);
dot(Label("$C$",align=SW),pC);
dot(Label("$D$",align=SE),pD);
dot(Label("$E$",align=NW),pE);

line l1 = line(pA,false,pA-(1,0));
line l2 = line(pE,false,pFi);

draw(l1);
draw(l2);
draw(pA--pB, StickIntervalMarker(1,2,size=6,angle=-45,red,true));
draw(rotatedLabel("$6 \; cm$"), pB--pC, N);
draw(rotatedLabel("$4 \; cm$"), pC--pD, S,
     StickIntervalMarker(1,2,size=6,angle=-45,red));
draw(pD--pE,
     StickIntervalMarker(1,2,size=6,angle=-45,red));

markrightangle(pA-(1,0),pA,pB,blue);
markangle(Label("$35^\circ$"),pA,pB,pC,radius=12mm,blue,StickIntervalMarker(i=1,n=1,size=4,blue));
markangle(Label("$112^\circ$"),pB,pC,pD,radius=7mm,blue);
markangle(Label("$78^\circ$"),pC,pD,pE,radius=5mm,blue);
markangle(pD,pE,pFi,radius=12mm,blue,StickIntervalMarker(i=1,n=1,size=4,blue));

addMargins(30mm,0mm,40mm,0mm);
shipout(bbox(xmargin=1mm,invisible));

Étiquettes : ,


Asymptote using trembling.asy – fig0100

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 11 h 24 min

Figure 0010

Note that the makers are also deformed...

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;
size(12cm);
startTrembling();

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

point A=(1,1);
line l1=line(45,A);
dot("$A$",A);
draw("$(l_1)$",l1);

point B=(3,1);
line l2=line(-60,B);
dot("$B$",B);
draw("$(l_2)$",l2);

markangleradiusfactor*=5;
markangle(2,l2,l1,0.8*green,StickIntervalMarker(i=1,n=2));

markangle(2,radius=-0.5*markangleradius(),
          l2,l1,0.8*blue);

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

markangle((string) sharpdegrees(l2,l1),
          radius=-1.5*markangleradius(),
          reverse(l2),l1,Arrow,red);

Étiquettes : , ,


  • Page 1 of 2
  • 1
  • 2
  • >