Extract rotation matrix for arbitrary axis into utils