I wish to plot an ellipse by scanline finding the values for y for each value of x.
For a plain ellipse the formula is trivial to find: y = Sqrt[b^2 – (b^2 x^2)/a^2]
But when the axes of the ellipse are rotated I’ve never been able to figure out how to compute y (and possibly the extents of x)
In parametric form
Where psi is the rotation angle, and a and b the semi-axes.
The parameter t goes from 0 to 2 Pi.
Or if you prefer in Cartesian non-parametric form:
Which yields to the two possible solutions for y[x], equivalent to the two solutions for the square root in the non-rotated case:
Well, you asked for it 🙂
Those functions give:
And the limits for x are: