Transforming and representing ellipses

65 Views Asked by At

I hope I can explain this well enough and I apologize for the bad formatting. I am reading out elliptic arcs from SVG files. It means that I get Rx, Ry, phi and the start- and end points of the arc.

I then represent the arc as a parametrized curve. I do this by applying an intrinsic affine transformation E to a circle:

translate ; rotate ; scale ; vector (sorry, I don't know how to make matrices and vectors)

[1 0 cx] [cos -sin 0] [Sx 0 0] [cos(t)]

[0 1 cy] [sin cos 0] [0 SY 0] [sin(t)]

I can now just apply any transformation T by multiplying it to the intrinsic transformation E. But this leaves me with a problem, because I want to convert the curve back into SVG format. so I need to extract the 5 parameters (Rx, Ry, Phi, P1, P2) from the transformation somehow.

To illustrate a special case, where T is a X-axis scaling, I made this:

enter image description here

So to break down my question(s):

  1. Is a generally transformed curve even still an ellipse? If not then the following question are largely irrelevant.

  2. Can the start and end point just be transformed by T*E?

  3. I wanted to extract Rx, Ry and Phi by using the using the major and minor vectors (black vectors in the drawing). But they are no longer perpendicular after a scaling (red vectors). So any how to extract Rx, Ry and Phi from the T*E transformation?

1

There are 1 best solutions below

0
On

Yes, the transformed curve is again an ellipse. In fact, applying any affine transformation to an ellipse will produce another ellipse.

Yes, you can get the end-points of the transformed curve by transforming the end-points of the original curve.

Your third question is much harder. Do you know anything about eigenvalues and eigenvectors and diagonalizing matrices? This might be a place to start.