Distinguish between viewport and window in computer graphics
Answers
Window:
A world-coordinate area selected for display is called a window.
In computer graphics, a window is a graphical control element.
It consists of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.
A window defines a rectangular area in world coordinates. You define a window with a GWINDOW statement. You can define the window to be larger than, the same size as, or smaller than the actual range of data values, depending on whether you want to show all of the data or only part of the data.
Viewport:
An area on a display device to which a window is mapped is called a viewport.
A viewport is a polygon viewing region in computer graphics. The viewport is an area expressed in rendering-device-specific coordinates, e.g. pixels for screen coordinates, in which the objects of interest are going to be rendered.
A viewport defines in normalized coordinates a rectangular area on the display device where the image of the data appears. You define a viewport with the GPORT command. You can have your graph take up the entire display device or show it in only a portion, say the upper-right part.