- #1

- 9

- 0

This is my attempt. Phi is the angle of rotation of the given mystery axis and abtemp is its size. X(3),Y(3) is the third point. The first equation assumes that the given axis is the major axis and the second assumes it is the minor axis. The problem is that for some of these near 400 ellipses I get negative and imaginary values for the other axes. I'm not sure what's going on here.

tb1 = (-X(3)*sin(phi)+Y(3)*cos(phi)-Ycenter)/sqrt(1-((X(3)*cos(phi)+Y(3)*sin(phi) Xcenter)/abtemp)^2);

ta1 = (X(3)*cos(phi)+Y(3)*sin(phi)-Xcenter)/sqrt(1-((-X(3)*sin(phi)+Y(3)*cos(phi)-Ycenter)/abtemp)^2);