Animation with Asymptote – fig0040

Category: Animation,AsymptotePh. Ivaldi @ 11 h 20 min

Figure 0004
(Compiled with Asymptote version 1.43)
Movie flash (swf)
This animation is available in the Syracuse web site.
    
import geometry;
import animate;
settings.tex="pdflatex";
settings.outformat="pdf";

animation Anim;

size(10cm,0);

circle C=circle(origin,1);
draw(C);
point A=point(C,0), B, M;
guide locus;


for (real a=0.001; a < 360; a += 5) {
  save();
  B=angpoint(C,a);
  triangle t=triangle(origin,A,B);
  draw(t);
  draw(incircle(t), bp+0.8*blue);
  triangle intouch=intouch(t);
  draw(intouch, dot);
  M=intouch(t.AC);
  label("$N$", Label("$M$", 0.8*red), "$P$", intouch);
  dot(M, 0.8*red);
  locus=locus..M;
  draw(locus, bp+0.8*red);
  Anim.add();
  restore();
}

// Anim.movie();
Anim.pdf(keep=true);


Étiquettes : , , , ,


Animation with Asymptote – fig0120

Category: Animation,AsymptotePh. Ivaldi @ 19 h 20 min

Figure 0012
(Compiled with Asymptote version 1.86svn-r4626)
Movie flash (swf)
This animation is available in the Syracuse web site.
    
import geometry;
import animate;
settings.tex="pdflatex";
settings.outformat="pdf";

animation anim;
size(12cm);



point F1=(0,0), F2=(10,0);
dot("F",F2);
ellipse el1=ellipse(F1,F2,6), el2;
draw(el1, linewidth(bp));
point Fp2=shift(2*el1.a,0)*F2;
line tgt, saxe;
pen[] p=new pen[]{0.8*green,0.8*blue,0.8*yellow,cyan};
path[] locus=sequence(new path(int i){return nullpath;},p.length);
real t=1/(p.length-1);

bool initlocus=true;
for (int i=0; i < 360; i += 1) {
  save();
  point Fm=rotate(i,F2)*Fp2;
  dot("F'",Fm);
  draw(Fm--F2, linewidth(2bp));
  point M=intersectionpoints(el1, line(F2,false,Fm))[0];
  tgt=tangents(el1,M)[0];
  draw(tgt, 0.8*red);
  el2=reflect(tgt)*el1;
  draw(el2.F1--el2.F2);

  for (int j=0; j < p.length; ++j) {
    point P=point(segment(el2.F2,Fm),0.5+j*t/2);
    locus[j]=initlocus ? P : locus[j]--P;
    dot(P, p[j]);
    draw(locus[j], bp+p[j]);
  }

  dot(el2.F2);
  draw(el2, linewidth(bp));
  anim.add();
  restore();
  initlocus=false;
}
erase();
anim.movie();

Étiquettes : , , , ,