Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Computer Graphics-Unit-IV Windowing and Clipping

Rating
-
Sold
-
Pages
21
Uploaded on
30-03-2023
Written in
2021/2022

chapter name :-Windowing and Clipping

Institution
Course

Content preview

Unit-IV Windowing and Clipping




Second Year Diploma Courses in Computer Science & Engineering /
Computer Engineering / Computer Technology / Information Technology Branch.




Computer Graphics
As per MSBTE ‘I’ Scheme Syllabus
CGR-22318

Unit-IV
Windowing and Clipping
Total Marks- 18

Contents:
4.1 Windowing and Clipping Concept
4.2 Window to Viewport Transformation
4.3 Line Clipping
4.3.1 Cohen Sutherland Clipping Algorithm
4.3.2 Cyrus-beck Line Clipping Algorithm
4.3.3 Liang Barsky Line Clipping Algorithm
4.3.4 Midpoint Subdivision Line Clipping Algorithm
4.4 Polygon Clipping:
4.5 Text Clipping




CGR-22318 www.freestudyroom.xyz Page 1

, Unit-IV Windowing and Clipping

Unit-IV Windowing and Clipping

4.3.1 Windowing and Clipping Concept:
Window: world-coordinate area selected for display is called a window. A window defines a
rectangular area in world coordinates.
Windowing: The process of selecting and viewing the picture with different views is called
windowing.
Clipping: The process which is divides each elements of the picture into its visible and invisible
portions, allowing the invisible portion to be discarded is called clipping.

4.3.2 Window to Viewport Transformation:
The window defines what is to be viewed; the viewport defines where it is to be displayed.
1. Window-to-Viewport transformation is the process of transforming a two-dimensional, world-
coordinate scene to device coordinates.
2. In particular, objects inside the world or clipping window are mapped to the viewport. The
viewport is displayed in the interface window on the screen.




Figure: window and viewport

The picture is stored in the computer memory using any convenient Cartesian co-ordinate system,
referred to as World Co-Ordinate System (WCS). However, when picture is displayed on the display
device it is measured in Physical Device Co-Ordinate System (PDCS) corresponding to the display
device.
The viewing transformation which maps picture co-ordinates in the WCS to display co-ordinates in
PDCS is performed by the following transformations.
• Converting world co-ordinates to viewing co-ordinates.
• Normalizing viewing co-ordinates.
• Converting normalized viewing co-ordinates to device co-ordinates.




CGR-22318 www.freestudyroom.xyz Page 2

, Unit-IV Windowing and Clipping




Figure: Two-dimensional viewing-transformation pipeline.
The steps involved in viewing transformation:-
1. Construct the scene in world co-ordinate using the output primitives and attributes.
2. Obtain a particular orientation for the window by setting a two-dimensional viewing co-ordinate
system in the world co-ordinate plane and define a window in the viewing co-ordinate system.
3. Use viewing co-ordinates reference frame to provide a method for setting up arbitrary orientations
for rectangular windows.
4. Once the viewing reference frame is established, transform descriptions in world co-ordinates to
5. Define a view port in normalized co-ordinates and map the viewing co-ordinates description of the
scene to normalized co-ordinates.
6. Clip all the parts of the picture which lie outside the viewport.
4.3.3 Line clipping:
In line clipping, we will cut the portion of line which is outside of window and keep only the portion
that is inside the window.
The line clipping algorithms are:
1. Cohen Sutherland Line Clipping Algorithm
2. Cyrus-beck Line Clipping Algorithm
3. Liang-Barsky Line Clipping Algorithm
4. Midpoint Subdivision Line Clipping Algorithm
4.3.1 Cohen Sutherland Line Clipping Algorithm
This algorithm uses the clipping window as shown in the following figure. The minimum coordinate
for the clipping region is (XW_{min}, YW_{min}) and the maximum coordinate for the clipping
region is (XW_{max}, YW_{max}).




CGR-22318 www.freestudyroom.xyz Page 3

Written for

Course

Document information

Uploaded on
March 30, 2023
Number of pages
21
Written in
2021/2022
Type
Class notes
Professor(s)
S.gaikwad
Contains
Chapter 4

Subjects

$8.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
shreyasshirsath

Get to know the seller

Seller avatar
shreyasshirsath silver lotus school
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
14
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions