PIPRIME.FR BLOG

Live fully to honor life

Tag Locus -- Asymptote Gallery

đź”—animations-fig004

Show animations/fig0040.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Animation
Tags : #Geometry | #Animation | #Triangle | #Circle | #Locus

import geometry;
import animate;
animation Anim;

size(12cm);

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();

đź”—animations-fig011

Show animations/fig0120.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Animation
Tags : #Ellipse | #Tangent | #Geometry | #Animation | #Locus

import geometry;
import animate;

animation anim;
size(16cm);

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();

0%