How to define an ellipse by the eigendecomposition of its transformation matrix?
10 views (last 30 days)
I'm trying to establish the correct setup for defining an ellipse as a 'stretch' of a circle and a rotation of the result. For simplicity assume the centres of the circle and therefore the ellipse to be so that the equation of the ellipse is
Now let the eigenvalues of be and so that the 'stretch' matrix is
and let the rotation, counter-clockwise, of an angle θ from the x-axis be achieved by the transformation
Since , is an admissible matrix of eigenvectors and it should be possible to express as the product of its eigendecomposition by
However, when I perform the reverse operation in practice, clearly something in the above is not correct, but I'm not sure what it is. The code snippet below illustrates the issue for and , . What is it I'm getting wrong?
>> theta = pi/4
>> R = [cos(theta) sin(theta); -sin(theta) cos(theta)]
>> S = [1 0; 0 4]
>> A = R*S*R'
>> [V,D] = eig(A)