Principal stresses, their inclinations, and their trajectory

What is the formulation for calculating the principal stresses, their inclinations, and their trajectory? Where can I find this information?