Hi,
I have been reading the 7th Ed of OpenGL programming guide and got stuck on this example(pg 150):
“The camera position (eyex, eyey, eyez) is at (4, 2, 1). In this case, the camera is looking
right at the model, so the reference point is at (2, 4, –3). An orientation vector of (2, 2, –1) is chosen to rotate the viewpoint to this 45degree angle”
So, the look vector(from camera position to reference point) is (2, 2, 4). First of all, the up vector they give (2, 2, –1) is not even perpedicular to the look vector! (2, 2, 4) . (2, 2, 1) is NOT 0.
This is how I do my calculation (in Mathematica) for the Up Vector:

LookV = Normalize[{2, 2, 4}]
{1/Sqrt[6], (1/Sqrt[6]), Sqrt[2/3]} 
RightV = Normalize[Cross[LookV, {0, 1, 0}]]
{(2/Sqrt[5]), 0, 1/Sqrt[5]} 
UpV = Normalize[Cross]
{1/Sqrt[30], Sqrt[5/6], Sqrt[2/15]} 
UpVp = Simplify[RotationMatrix[45 Degree, LookV] . UpV]
{1/30 (6 Sqrt[10] + Sqrt[15]), Sqrt[5/3]/2, 1/Sqrt[10] + 1/Sqrt[15]} 
For verification:
ArcCos[Simplify[UpVp.UpV]]
[Pi]/4
Simplify[Dot[UpVp, LookV]]
0
Dot[LookV, UpV]
0
Does my method make sense?