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
In the general
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
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.
- object space (local space)
- world space
- applying the model matrix to object space
- view space
- applying the view matrix to world space
- clip space
- applying the projection matrix to view space
- normalized device coordinate
- perspective divide clip space by
- perspective divide clip space by
- screen space
Footnotes
-
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. ↩
-
Image from Coordinate Systems | Learn OpenGL ↩