Viewport

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

A viewport is a polygon viewing region in computer graphics.

In computer graphics theory, there are two region-like notions of relevance when rendering some objects to an image. In textbook terminology, the world coordinate window is the area of interest (meaning what the user wants to visualize) in some application-specific coordinates, e.g. miles, centimeters etc.

The word window as used here should not be confused with the GUI window, i.e. the notion used in window managers.[1] Rather it is an analogy with how a window limits what one can see outside a room.[2]

In contrast, the viewport is an area (typically rectangular) expressed in rendering-device-specific coordinates, e.g. pixels for screen coordinates, in which the objects of interest are going to be rendered. Clipping to the world-coordinates window is usually applied to the objects before they are passed through the window-to-viewport transformation. For a 2D object, the latter transformation is simply a combination of translation and scaling, the latter not necessarily uniform.[1] An analogy of this transformation process based on traditional photography notions is to equate the world-clipping window with the camera settings and the variously sized prints that can be obtained from the resulting film image as possible viewports.[2]

Because the physical-device-based coordinates may not be portable from one device to another, a software abstraction layer known as normalized device coordinates is typically introduced for expressing viewports; it appears for example in the Graphical Kernel System (GKS) and later systems inspired from it.[3]

In 3D computer graphics it refers to the 2D rectangle used to project the 3D scene to the position of a virtual camera. A viewport is a region of the screen used to display a portion of the total image to be shown.[4]

In virtual desktops, the viewport is the visible portion of a 2D area which is larger than the visualization device. In web browsers, the viewport is the visible portion of the entire document. If the document is larger than the viewport, the user can shift the viewport around by scrolling.[5]

References

  1. 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. http://msdn.microsoft.com/en-us/library/ff634571.aspx Microsoft - What Is a Viewport?
  5. Lua error in package.lua at line 80: module 'strict' not found.

External links