Ellipsographes

Ellipsographe par cercle directeur

Animation flash


ellipsographe3.mp
%@DATE: 30 mai 2005
 
input fichierps;
 
InitFichierPS(-170,-120,170,120);
 
u = 1.2cm;
 
r = 3;
d = 2.2;
l = (r+d)/2;
 
 
% Les points fixes.
pair A,B;
A = (0,0);
B = (d*u,0);
 
% Le cercle.
path cA;
cA = fullcircle scaled (2*r*u);
 
vardef Point(expr p) =
    draw p withpen pencircle scaled 4;
    draw p withpen pencircle scaled 3 withcolor white;
enddef;
 
% L'ellipse;
path e;
 
for i=0 upto 90:
  beginfig(i+1);
 
    pair C,D,E,F,I;
 
    C := point (8*i/90+0.01) of cA;
    k := abs(B-C)/2/u;
    h := l*sqrt(1-(k/l)*(k/l));
    I := .5[B,C];
    D := I + (h*u)*((0,1) rotated angle(C-B));    
    F := 2[D,I];
    E := (C--A) intersectionpoint (D--F);
    k := abs(D-F)/u;
    I := D + (2.1*l/k)*(F-D);
 
    fill cA withcolor 0.8white;
 
    drawoptions(withcolor 0.6white);    
    draw cA;
    draw (-1.3l,0)--(1.3l,0);
    drawoptions();
 
    drawarrow subpath (0,8*i/90) of cA;
 
    if i=0: 
	e := E;
    else:
	e := e -- E;
	draw e withpen pencircle scaled 1 withcolor blue;
    fi
 
    drawoptions(withpen pensquare scaled 2 withcolor (1,0.08,0.58));	
    draw A--C;
    draw C--D--B--F--cycle;
    draw D--I;
    drawoptions();
 
    Point(A);
    Point(B);
    Point(C);
    Point(E); 
    Point(F);
    Point(D);
  endfig;
endfor;
 
end