HOME

TheInfoList



OR:

A viewport is a polygon viewing region in
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
. In
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
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 manager A window manager is system software that controls the placement and appearance of window (computing), windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They ...
s. Rather it is an analogy with how a
window A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent ma ...
limits what one can see outside a room. 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 Translation is the communication of the semantics, meaning of a #Source and target languages, source-language text by means of an Dynamic and formal equivalence, equivalent #Source and target languages, target-language text. The English la ...
and scaling, the latter not necessarily uniform. An analogy of this transformation process based on traditional
photography Photography is the visual arts, art, application, and practice of creating images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film. It is empl ...
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. Because the physical-device-based coordinates may not be portable from one device to another, a software
abstraction layer In computing, an abstraction layer or abstraction level is a way of hiding the working details of a subsystem. Examples of software models that use layers of abstraction include the OSI model for network protocols, OpenGL, and other graphics libra ...
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. In
3D computer graphics 3D computer graphics, sometimes called Computer-generated imagery, CGI, 3D-CGI or three-dimensional Computer-generated imagery, computer graphics, are graphics that use a three-dimensional representation of geometric data (often Cartesian coor ...
, the viewport refers to the 2D rectangle used to project the 3D scene to the position of a
virtual camera In 3D computer graphics, 3D video games, a virtual camera system aims at controlling a camera or a set of cameras to display a view of a 3D virtual world. Camera systems are used in video games where their purpose is to show the action at the b ...
. A viewport is a region of the screen used to display a portion of the total image to be shown. In
virtual desktop In computing, a virtual desktop is a term used with respect to user interfaces, usually within the WIMP (computing), WIMP paradigm, to describe ways in which the virtual space of a computer's desktop environment is expanded beyond the physical ...
s, the viewport is the visible portion of a 2D area which is larger than the visualization device. When viewing a document in a
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
, the viewport is the region of the browser window which contains the visible portion of the document. If the size of the viewport changes, for example as a result of the user resizing the browser window, then the browser may reflow the document (recalculate the locations and sizes of elements of the document). If the document is larger than the viewport, the user can control the portion of the document which is visible by scrolling in the viewport.


See also

* Image plane *
Angle of view In photography, angle of view (AOV) describes the angular extent of a given scene that is imaged by a camera. It is used interchangeably with the more general term '' field of view''. It is important to distinguish the angle of view from the ...


References

{{Reflist


External links

* http://www.tecgraf.puc-rio.br/ftp_pub/lfm/L1J_WindowViewport.pdf * https://www.siggraph.org/education/materials/HyperGraph/viewing/view2d/2dview0.htm Computer graphics 3D computer graphics Computer graphics data structures