%  Here we test some ideas about stress transformation.


%  Stress tensor


sigma = [ 4 -2 5; -2 -6 0; 5 0 8]

% Here's a rotation

theta = 30*pi/180;

Q = [  cos(theta)  -sin(theta)   0
       sin(theta)   cos(theta)   0
                0            0   1 ];
sigma_p = Q' * sigma * Q

%  Characteristic polynomial

pc = poly(sigma)

%  Eigenvalues and vectors

[T,P] = eigs(sigma)

% Note that 

sigma_d = T' * sigma * T

%  Also show that 