What's the parametric equation for the general form of an ellipse rotated by any amount?
Preferably, as a computer scientist, how can this equation be derived from the three variables: coordinate of the center/two foci and eccentricity of an ellipse?
I need to generate completely random eclipses within certain bounds. The variables I described above are most convenient. This is for a personal project of mine and I can't find anybody who can help me.
Best Answer
Let's start with the parametric equation for a circle centered at the origin with radius 1:
To turn this into an ellipse, we multiply it by a scaling matrix of the form
which gives
To rotate this by θ degrees, multiply it by the rotation matrix
So the new parametric equation would be
You can then translate this to have center (x0, y0) by adding these components to the parametric components.
Hope this helps!