---
title: "Define window and viewport"
subject: "Computer Graphics"
chapter: 3
key: "semester_5/computer_graphics:window-viewport-definition"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/window-viewport-definition
site: BCT Engineering
---

# Define window and viewport

Computer Graphics · Chapter 3: Two –Dimensional Transformations

- Asked in: 2076 Chaitra, 2 marks; 2070 Chaitra, 1 marks (asked 2 times)
- Video: [Window and viewport (2D viewing transformation) | World and device coordinates](https://www.youtube.com/watch?v=Rwj50JB-vvE) — Abhishek Sharma
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/window-viewport-definition
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-3

## Question

Define window and view port.

## Short answer

A window is a rectangular area in world coordinates that selects the portion of the scene to display; a viewport is the rectangular area on the display device where the window content appears. The window-to-viewport transformation maps the window onto the viewport.

## Answer

**Window:** a rectangular area in the world coordinate system that selects which part of the scene is to be displayed.

**Viewport:** a rectangular area on the display device (screen, in device or normalised coordinates) in which the contents of the window are shown. The window-to-viewport transformation maps the window onto the viewport.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. A window is:
   A. a rectangular area in world coordinates that selects the part of the scene to display
   B. an area on the screen where the image appears
   C. the frame buffer
   D. a region used only for filling
   Answer: A. It is defined in the world coordinate system. (Key point: Window)

2. A viewport is:
   A. a rectangle in world coordinates selecting the scene
   B. the area on the display device (device or normalised coordinates) where the window contents are shown
   C. the clipping algorithm
   D. the set of pixels on the boundary
   Answer: B. The window is mapped onto it. (Key point: Viewport)

3. The window-to-viewport transformation:
   A. maps the viewport onto the world
   B. removes the window contents
   C. maps the window onto the viewport
   D. only rotates the window
   Answer: C. It converts world window coordinates to device viewport coordinates. (Key point: Mapping)

## Related in Computer Graphics

- [Triangle window to viewport mapping](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aviewing-transform-triangle-window-viewport) — Computer Graphics, chapter 3
- [Rectangle window to viewport mapping](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aviewing-transform-rectangle-window-viewport) — Computer Graphics, chapter 3
- [3D window to viewport transformation](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Awindow-viewport-3d-matrix) — Computer Graphics, chapter 4
