function [F,U]=rotate_pc_1(alpha0,lamda,pc2,EP)
alpha1=alpha0(1);
alpha2=alpha0(2);
beta1=alpha0(3);
beta2=alpha0(4);


U=[alpha1 beta1;
   alpha2 beta2];
%check
pc0=pc2*U;
w20=pc0\EP
check1=w20(1,1)>0;
check2=w20(2,end)>0;
if check1+check2==2
%unit length
F1=norm(U(:,1))-1;
F2=norm(U(:,2))-1;
F3=alpha1*beta1+alpha2*beta2;
F4=lamda(2)*alpha1-lamda(1)*alpha2;
else
F1=1000;
F2=1000;
F3=1000;
F4=1000;
end
F=[F1;F2;F3;F4];


