Ellipse parameters given limits
I am having a hard time finding ellipse parameters (major and minor radius and rotation), given the limits of the ellipse.
The other way around was not so hard: Given a (rotated) ellipse, find out its closest bounding box; for this, I used the parameterized representation, set their derivatives to zero, and found the "t" parameter for which x and y were minimal/maximal, respectively.
However, given the positions where x and y are maximal (or minimal) and the location of the center of the ellipse, how can I find the radii and rotation? (NB, I have these positions as (x, y) locations, not as "t" parameter)
I'll state the "real" problem in case there is a wholly different approach: I have a (possibly rotated) ellipse in a drawing program, and the user can resize its bounding box. The ellipse should scale along with the bounding box. I think the positions of the limits (i.e., where the ellipse touches the bounding box) can be easily calculated since they scale linearly with the bounding box itself. The "easy way out" would be to store the ellipse as "position, minor and major radii, affine transform" but that means a rather big "refactoring" of the rest of the software. Besides, I can't stand that I don't know the solution now that I've tried a few times :)
Thanks in advance,