I think of orientation as the current angular position of an object and rotation as an operation which takes a starting orientation and turns it into a possibly different orientation. However both rotation and orientation can be defined in the same way, provided we have a reference orientation we can always define orientation as a rotation from its reference orientation.

There are a number of different ways to represent this rotation in 3D (see rotation).

One possibility, explained under rotation, would be to use 3 angles, say azimuth, elevation, and tilt.

Another possibility would be to use a vector, with the direction of the vector representing the axis of rotation and the length of the vector representing the amount of rotation. However it is important to realise that vector addition cannot be used to calculate the result of concatenated rotations. As an example of how rotations are different, rotating 90 degrees in the x plane followed by 90 degrees in the y plane results in a rotation in the z plane.

So vector addition cannot be used for combining rotations, instead we have to multiply quaternions or matrices.

## Representing rotation in program

Rotation in 3D space can be held in a quaternion (see class sfrotation) or a matrix (see class sftransform). For an example of how this might be used in a scenegraph node, see here.