Calculating VRML Viewpoints

Original Authors: Kevin Laurent, Steve Chenney. Original Source: http://vrmlworks.crispen.org/orient.html

Camera Location: (where are you)
X Y Z

Look At Vector: (coordinates of the object you want to look at)
X Y Z

Look Up Vector: (usually 0 1 0)
X Y Z

Viewpoint Orientation (calculated):

First three numbers = axis (unit vector), last number = angle (radians).
The rotation transform the world coord frame into the viewpoint, with the original negative z axis looking into the direction of the look-at vector.