The clip coordinate system is a
homogeneous coordinate system
In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...
in the
graphics pipeline
In computer graphics, a computer graphics pipeline, rendering pipeline or simply graphics pipeline, is a conceptual model that describes what steps a graphics system needs to perform to render a 3D scene to a 2D screen. Once ...
that is used for
clipping
Clipping may refer to:
Words
* Clipping (morphology), the formation of a new word by shortening it, e.g. "ad" from "advertisement"
* Clipping (phonetics), shortening the articulation of a speech sound, usually a vowel
* Clipping (publications ...
.
Objects' coordinates are transformed via a
projection transformation into clip coordinates, at which point it may be efficiently determined on an object-by-object basis which portions of the objects will be visible to the user. In the context of OpenGL or
Vulkan
Vulkan is a low- overhead, cross-platform API, open standard for 3D graphics and computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulkan is intended to offer higher perform ...
, the result of executing vertex processing
shaders
In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of a 3D scene - a process known as ''shading''. Shaders have evolved to perform a variety of speci ...
is considered to be in clip coordinates.
All coordinates may then be divided by the
component of 3D
homogeneous coordinates
In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...
, in what is called the
perspective division
In linear algebra, linear transformations can be represented by matrices. If T is a linear transformation mapping \mathbb^n to \mathbb^m and \mathbf x is a column vector with n entries, then
T( \mathbf x ) = A \mathbf x
for some m \times n mat ...
.
More concretely, a point in clip coordinates is represented with four components,
:
and the following equality defines the relationship between the normalized device coordinates
,
and
and clip coordinates,
:
Clip coordinates are convenient for clipping algorithms as points can be checked if their coordinates are outside of the viewing volume. For example, a coordinate
for a point is within the viewing volume if it satisfies the inequality
.
Polygons with vertices outside of the viewing volume may be clipped to fit within the volume.
Clipping algorithms
*
Newman–Sproull
*
Cyrus–Beck
*
Sutherland–Hodgman algorithm
The Sutherland–Hodgman algorithm is an algorithm used for clipping polygons. It works by extending each line of the convex ''clip polygon'' in turn and selecting only vertices from the ''subject polygon'' that are on the visible side.
De ...
External links
Official OpenGL website
References
Clipping (computer graphics)
{{Compu-graphics-stub