% Polar ellipse with true anomaly measured from perigee
a_km = 14000;
e = 0.35;
nu = linspace(0, 2*pi, 721);
r_km = a_km*(1-e^2) ./ (1 + e*cos(nu));
x_km = r_km .* cos(nu);
y_km = r_km .* sin(nu);

plot(x_km, y_km, 'LineWidth', 1.8)
hold on
plot(0, 0, 'o', 'MarkerSize', 10, 'MarkerFaceColor', [0.1 0.45 0.8])
axis equal; grid on
xlabel('x from Earth focus (km)')
ylabel('y from Earth focus (km)')
title('Elliptical orbit: Earth is at one focus')

