. . . "where W is a predetermined 3x3 matrix and R is the 3x3 matrix that I am trying to optimize, with the constraint that it must be a rotation matrix." .