Direction cosines. Closes #25.