% Seznam rotaci z Laueho grupy kubicke mrize, seznam variant CuAlNi a
% transformaci mezi krystalografickymi smery v austenitu a martenzitu
clear Eb Ed Es U i1 i2 i3 Qa S P;

Eb = 0.91542;
Ed = 1.04370;
Es = 0.02002;

U{1} = [Eb   0   0; 0  Ed -Es; 0 -Es  Ed];

i1=[1 0 0]';
i2=[0 1 0]';
i3=[0 0 1]';

Qa{1}  =  i1*i3' + i2*i1' + i3*i2';
Qa{2}  =  i1*i2' + i2*i3' + i3*i1';
Qa{3}  = -i1*i2' + i2*i3' - i3*i1';
Qa{4}  = -i1*i3' - i2*i1' + i3*i2';
Qa{5}  = -i1*i2' - i2*i3' + i3*i1';
Qa{6}  =  i1*i3' - i2*i1' - i3*i2';
Qa{7}  =  i1*i2' - i2*i3' - i3*i1';
Qa{8}  = -i1*i3' + i2*i1' - i3*i2';
Qa{9}  =  i1*i2' + i2*i1' - i3*i3'; p{9} = normc(i1+i2);
Qa{10} = -i1*i2' - i2*i1' - i3*i3'; p{10}= normc(i1-i2);
Qa{11} =  i1*i3' - i2*i2' + i3*i1'; p{11}= normc(i1+i3);
Qa{12} = -i1*i3' - i2*i2' - i3*i1'; p{12}= normc(i1-i3);
Qa{13} = -i1*i1' + i2*i3' + i3*i2'; p{13}= normc(i2+i3);
Qa{14} = -i1*i1' - i2*i3' - i3*i2'; p{14}= normc(i2-i3);
Qa{15} =  i1*i1' - i2*i2' - i3*i3'; p{15}= i1;
Qa{16} = -i1*i1' + i2*i2' - i3*i3'; p{16}= i2;
Qa{17} = -i1*i1' - i2*i2' + i3*i3'; p{17}= i3;
Qa{18} =  i1*i1' - i2*i3' + i3*i2';
Qa{19} =  i1*i1' + i2*i3' - i3*i2';
Qa{20} =  i1*i3' + i2*i2' - i3*i1';
Qa{21} = -i1*i3' + i2*i2' + i3*i1';
Qa{22} = -i1*i2' + i2*i1' + i3*i3';
Qa{23} =  i1*i2' - i2*i1' + i3*i3';


U{2}=Qa{16}'*U{1}*Qa{16};
U{3}=Qa{10}'*U{1}*Qa{10};
U{4}=Qa{9 }'*U{1}*Qa{9 };
U{5}=Qa{12}'*U{1}*Qa{12};
U{6}=Qa{11}'*U{1}*Qa{11};

S{1} = normc([0 -1  1; 1  0  0; 0  1  1]);
S{2} = normc([0  1  1; 1  0  0; 0  1 -1]);
S{3} = normc([1  0 -1; 0  1  0; 1  0  1]);
S{4} = normc([1  0  1; 0  1  0; -1  0  1]);
S{5} = normc([-1  1  0; 0  0  1; 1  1  0]);
S{6} = normc([1  1  0; 0  0  1; 1 -1  0]);

P = [
     0 16 10  9 12 11; 
    16  0  9 10 11 12; 
    10  9  0 15 14 13; 
     9 10 15  0 13 14; 
    12 11 14 13  0 15; 
    11 12 13 14 15  0];

clear i1 i2 i3;
