In computer graphics, there are various objects such as points, vectors, and normal vectors in space. These values are meaningless without a coordinate system that defines the origin of the space and gives basis vectors that define , , and axis. Together, the origin and those basis vectors are called frame that defines the coordinate system.

In the general -dimensional case, a frame’s origin and its linearly independent basis vectors define an n-dimensional affine space. All vectors in the space can be represented as a linear combination of the basis vectors. Given a vector and the basis vectors , there is a unique set of scalar values such that

We can represent points in a similar way:

Defining points and vectors in terms of coordinate systems introduces a paradox: to establish a frame, we need a point and a set of vectors, yet points and vectors can only be meaningfully described relative to an existing frame. To resolve this, we rely on a standard frame with an origin at and unit vectors as the basis. This standard frame is referred to as the world space, and all other frames are defined relative to this canonical coordinate system. 1

Subsections

Different Coordinate Systems

There are various coordinate systems used in computer graphics. We can perform operations such as vector addition and multiplication as long as the vectors are within the same coordinate system. However, mixing vectors from different coordinate systems leads to ill-defined results. 2 To convert a vector from one space to another, you can apply a transformation using a matrix.

Here are some common coordinate systems (spaces) used in computer graphics applications.

coordinate_systems.png 3

Footnotes

  1. Coordinate Systems

  2. The type system of normal programming languages or shading languages usually won’t prevent the kind of “geometry bugs” by using vectors in wrong coordinate systems, but there are active researches on how to solve this problem.

  3. Image from Coordinate Systems | Learn OpenGL