Clip Space
   HOME

TheInfoList



OR:

The clip coordinate system is a homogeneous coordinate system in the
graphics pipeline The computer graphics pipeline, also known as the rendering pipeline, or graphics pipeline, is a framework within computer graphics that outlines the necessary procedures for transforming a three-dimensional (3D) scene into a two-dimensional (2 ...
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 cross-platform API and open standard for 3D graphics and computing. It was intended to address the shortcomings of OpenGL, and allow developers more control over the GPU. It is designed to support a wide variety of GPUs, CPUs and o ...
, 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 sp ...
is considered to be in clip coordinates. All coordinates may then be divided by the w 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. More concretely, a point in clip coordinates is represented with four components, :\beginx_c\\y_c\\z_c\\w_c\end, and the following equality defines the relationship between the normalized device coordinates x_n, y_n and z_n and clip coordinates, :\beginx_n\\y_n\\z_n\end = \beginx_c / w_c\\y_c / w_c\\z_c / w_c\end. 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 x_c for a point is within the viewing volume if it satisfies the inequality -w_c \leq x_c \leq w_c. 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


External links


Official OpenGL website


References

Clipping (computer graphics) {{Compu-graphics-stub