Graphics Primitives

Description

UpVector = [x, y, z] sets the 3D vector that
corresponds to the vertical direction of the 2D picture taken by the
camera.

UpVectorX etc. denote the coordinates of
the UpVector.

KeepUpVector = TRUE keeps the UpVector constant
when the camera is moved. With KeepUpVector = FALSE,
the UpVector is kept orthogonal to the optical
axis when the camera is moved.

The picture taken by a camera is defined by the attributes Position (the
3D position of the camera) and FocalPoint (the 3D point the camera is
pointed at). The vector from the position to the focal point is the
optical axis of the camera.

As an additional degree of freedom, the camera may be rotated
around the optical axis. This rotation is defined by specifying a
3D vector UpVector. In the final 2D picture taken
by the camera, this vector is parallel to the vertical axis, pointing
upwards.

With the default value UpVector = [0, 0, 1] the z-axis
in 3D points upwards in the 2D picture.

The UpVector of a camera must not be zero
and must not be parallel to the optical axis.

The default values are UpVector = [0, 0, 1] and KeepUpVector
= TRUE.

The restriction that the UpVector must not
be parallel to the optical axis leads to discontinuities when the
camera moves in such a way that this restriction is violated. In such
a case, KeepUpVector = FALSE should be used. Cf. Example 2.

Examples

Example 1

We view a cross of three arrows by a camera with the usual UpVector pointing
into z-direction:

Example 2

We use an animated camera to fly over the north pole of a planet
using the default UpVector = [0, 0, 1]. With KeepUpVector
= TRUE, we encounter a discontinuity when the camera is
positioned exactly over the north poly pointing straight down. The UpVector is
parallel to the optical axis at this point:

With KeepUpVector = FALSE, no such discontinuity
is encountered. However, when reaching the equator on the dark side
of the planet, the UpVector has turned around:
the upper side of the picture now is south, the lower side is north: