function [r,theta] = ellipse_rt(a,e) % Generates the r and theta coordinates of an ellipse with semi-major axis % a and eccentricity e b = a * sqrt(1-e^2); theta = 0 : 0.01 : 2 *pi; r = a * (1-e^2)./(1+e.*cos(theta));