function [sigman, tau] = mohr(sigma1, sigma3, theta)
%[sigman,tau] = mohr(sigma1, sigma3, theta)
%This function takes as arguments the principal stresses sigma1 and sigma3 
%and the angle theta measured in degrees anticlockwise between the +sigma1
%direction and the 
%normal to a plane of interest.  It will calculate the traction components
%sigman (normal) and tau (shear) using equations for the morh circle(eq. 9.17)
%JRA, March 6, 2000

thetarads=theta*pi/180;

sigman = 0.5*(sigma1+sigma3) + 0.5*(sigma1-sigma3)*cos(2*thetarads);
tau = 0.5*(sigma1-sigma3)*sin(2*thetarads);



%here is equation 9.15:
%sigman = sigma1*(cos(thetarads)^2) + sigma3*(sin(thetarads)^2)

%tau = -(sigma1-sigma3)*sin(thetarads)*cos(thetarads)

