3D Rotations: Parameter Computation and Lie Algebra based Optimization