Clip coordinates
{{Short description|Coordinate system used in computer graphics}}
The clip coordinate system is a homogeneous coordinate system in the graphics pipeline that is used for clipping.{{cite book|author1=Dave Shreiner|author2=OpenGL Architecture Review Board|title=OpenGL programming guide: the official guide to learning OpenGL, version 2|url=https://books.google.com/books?id=glIuQwAACAAJ|accessdate=29 December 2011|year=2006|publisher=Addison-Wesley|isbn=978-0-321-33573-9}}
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, the result of executing vertex processing shaders is considered to be in clip coordinates.{{cite web|url=https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf|title=OpenGL 4.6 Core Profile|date=May 14, 2018|first1=Mark|last1=Segal|first2=Kurt|last2=Akeley|publisher=The Khronos Group}}{{cite web|url=https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html|title=Vulkan® 1.0.98 - A Specification|author=The Khronos® Vulkan Working Group|publisher=The Khronos Group|date=January 13, 2019|accessdate=January 23, 2019}} All coordinates may then be divided by the component of 3D homogeneous coordinates, in what is called the perspective division.
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 .{{cite web|url=https://www.khronos.org/opengl/wiki/Vertex_Post-Processing|title=Vertex Post-Processing|publisher=The Khronos Group|accessdate=January 23, 2019}} Polygons with vertices outside of the viewing volume may be clipped to fit within the volume.
Clipping algorithms
External links
{{wikibooks|Programming:OpenGL}}
- [http://www.opengl.org/ Official OpenGL website] {{Webarchive|url=https://web.archive.org/web/20110226000710/http://www.opengl.org/ |date=2011-02-26 }}
References
{{Reflist}}
{{DEFAULTSORT:Clip Coordinates}}
Category:Clipping (computer graphics)
{{Compu-graphics-stub}}