I'm trying to come up with a way that as I progress linearly from $0$ to $360$ degrees or $0$ to $2\pi$ radians I have the the corresponding position (P) on the perimeter of an ellipse to also travel on it at a linear speed movement.


  • $\begingroup$ Do you want to progress at a linear angular speed, or a linear speed. You can't have it both ways. $\endgroup$ – Doug M Nov 24 '16 at 2:56
  • $\begingroup$ Linear speed along the perimeter.Having that solved I can probably remap the angle from 0-360 to the parameter range. $\endgroup$ – probiner Nov 24 '16 at 4:17
  • $\begingroup$ Related: math.stackexchange.com/questions/433094/… $\endgroup$ – Hans Lundmark Nov 24 '16 at 8:05
  • $\begingroup$ @HansLundmark I was looking for Arc Length driving the Angle. I don't know what is to integrate something... ergh.. $\endgroup$ – probiner Nov 24 '16 at 11:30

Suppose the ellipse is parameterized by $x = a\cos\theta$, $y = b\sin\theta$ for $\theta\in[0,2\pi)$. Without restricting generality assume that $b$ is the length of the semi-major axis, i.e., $b > a$. Then the arc length of the portion of the ellipse corresponding to $\theta\in [0,\alpha]$ is given by

$$ bE(\alpha,k) =b\int_0^\alpha \sqrt{1 - k^2\sin^2\theta}\,d\theta, $$

where $k = \sqrt{1 - (a/b)^2}$ and $E(\alpha,k)$ is the incomplete elliptic integral of the second kind. Let $A = bE(2\pi,k)$ be the circumference of the ellipse. If I understand your question properly, then given a sequence of equally spaced points $t_i = Ai/N$ for $i = 0,\ldots,N-1$ you want the corresponding values of $\theta_i$ such that $$ bE(\theta_i,k) = t_i,\quad i = 0,\ldots,N-1. $$ This can be accomplished by numerically inverting the function $E$ for each $t_i/b$ with the restriction that $\theta_i\in[0,2\pi)$. Note that since $E(\alpha,k)$ is strictly increasing, it has an inverse on $[0,\infty)$. If you are interested, I can provide some Octave (Matlab) code to compute the values of $\theta_i$.

  • $\begingroup$ Thank you. I have to study integrals >_> Cheers $\endgroup$ – probiner Dec 6 '16 at 11:22
  • $\begingroup$ It needs to be noted that this method gives uniform arc lengths, not uniform linear lengths. OP did ask for the former, from the comment "Linear speed along the perimeter", but if one is looking for the latter (like the cyan lines in the image of the question), it is going to be much more difficult. $\endgroup$ – syockit Mar 29 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.