楕円の方程式

clear; close all;

es = [0 0.2 0.5 0.8 0.999];
a = 1;
L = 2*a;

for idx=1:length(es)
    e = es(idx);
    D = L*e;
    c = D/2;
    b = sqrt(a^2-c^2);
    theta = linspace(0,2*pi,50);
    x = a*cos(theta)-c;
    y = b*sin(theta);
    plot(x,y,'DisplayName',sprintf('e=%.3g',e));
    hold on;
    axis equal;
end
legend();
plot(0,0,'bx','HandleVisibility','off');
text(0,0.1,'F');

big;