function theta  = compute_theta( t );

c = size(t);
c = c(1);
signoft = t(2:c,1).*t(1:c-1,2)-t(2:c,2).*t(1:c-1,1);



for i = 1:(max(size(signoft)));
    if( signoft(i) == 0 )
        signoft(i) =1;
    end;
end;
signoft = signoft./abs(signoft);

theta = signoft.*acos( t(2:c,1).*t(1:c-1,1)+t(2:c,2).*t(1:c-1,2));