Let the default lookat vector be e3 = (0,0,1), up vector e2=(0,1,0),
and the desired lookat and up vectors be v and u respectively.
The the rotation matrix R such that e3 R = v and e2 R = u
is
[ u/\v ]
R = [ u ]
[ v ]
assuming u and v are orthonormal.
Given R we find its axis, m, and angle, theta, as follows:
Put a = 0.5(trace(R) - 1) = 0.5(R[0][0] + R[1][1] + R[2][2] - 1)
put b = sqrt(1- a^2)
case 1: a=1, b=0.
theta=0, m=(0,0,0)
case 2: a=-1, b=0.
Put d = max R[i,i], c = sqrt((d+1)/2)
theta = pi, m = R[i] / c
case 3: b!=0
theta = acos(a)
m = (R[2][3]-R[3][2], R[3][1]-R[1][3], R[1][2]-R[2][1])/(2b)