I am working on a visualization for some data and I’ve run into a snag. I need to draw some ellipses based on data that looks like this:
{
x: 455.53 //the center x coordinate
y: 122.44 //the center y coordinate
e1: .24101 //value from -1 to 1, represents stretching along x when positive, along y when negative
e2: -.44211 //value from -1 to 1, represents stretching along the 45 degree line when positive and 135 when negative
}
Long story short, I have no idea how to do this… it is just for a one time visualization so efficiency isn’t a concern. If someone can suggest how to manipulate the e1/e2 to get the foci or major/minor axis and angle of rotation, that’d be super fancy. Thanks!
This form of specifying ellipticity is common in gravitational lensing. These ellipticity numbers are the real and imaginary parts of a complex ellipicity value; see the section Weak Lensing Observables and the expression for ε there.
I can’t do proper math notation here because of a policy decision; see this meta question. https://meta.stackexchange.com/questions/4152/adding-support-for-math-notation. Accordingly, I’ll simply point out that the magnitude of the vector is a transform of the major-minor axis ratio, and that the angle is half of the inverse tangent of the ratio of the two components.