3

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!

eh9
  • 7,340
  • 20
  • 43
FlyingStreudel
  • 4,434
  • 4
  • 33
  • 55
  • This question may get better responses at http://math.stackexchange.com. – carlosfigueira Oct 30 '12 at 23:41
  • Thanks, I'll try there as well! – FlyingStreudel Oct 30 '12 at 23:49
  • @FlyingStreudel Sorry, but what does `e1` and `e2` stand for? – Picrofo Software Oct 30 '12 at 23:54
  • Given the centre you need three parameters to describe an ellipse (eg semi-major axis, semi-minor axis and rotation) but you appear to have only two pieces of data. So I'd guess there is a lot of ellipses that fit your parameters. But what exactly do you mean by "stretch"? – dmuir Oct 31 '12 at 11:41
  • I believe it is describing the deformation of an arbitrarily sized circle. – FlyingStreudel Nov 01 '12 at 18:25
  • 1
    Take a circle, scale it according to `e2`, rotate it by 45°, then scale it according to `e1`. Is this what you want? Or do you first scale by `e1`, then rotate, then scale by `e2`, then rotate back? Or is there some form of simultaneous stretching? Do you have any way to verify whether a given interpretation matches the desired one? If so, can you post details on that? – MvG Nov 02 '12 at 18:57
  • Wow, I don't know why I was overthinking it. For some reason I thought the two operations had to be done simultaneously. Nope. Thanks so much! – FlyingStreudel Nov 06 '12 at 20:13

1 Answers1

1

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.

Community
  • 1
  • 1
eh9
  • 7,340
  • 20
  • 43