Professional Documents
Culture Documents
DB Viewing
DB Viewing
2D Viewing
Dr. G. Kumaravelan
Clipping
Cohen-Sutherland Line Clipping
Sutherland-Hodgeman Polygon Clipping
Text Clipping
Curve Clipping
Blanking
Viewport Transformation
Scan Conversion
Summary of Transformation
World
Coordinates
3 Graphics Lab @ Korea University
Clipping
CGVR
wy2
Inside =
(x>=wx1) &&
wy1
wx1 wx2
P1
P4 P8
P3
P2
P6
P10
P5 P9
Before Clipping
7 Graphics Lab @ Korea University
Line Clipping
CGVR
P4 P’8
P3
P6
P’5
After Clipping
8 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P1
P4 P8
P3
P2
P6
P10
P5 P9
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P5 0010 P9 0110
Bit 1 Bit 2
12 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P5 0010 P9 0110
Bit 1 Bit 2
13 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P5 0010 P9 0110
Bit 1 Bit 2
14 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
15 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
16 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
17 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
18 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
19 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
20 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
21 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
22 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
23 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 0110
P9
Bit 1 Bit 2
24 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 P’90110
Bit 1 Bit 2
25 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
P10
Bit 3
1010 P’5 0010 P’90110
Bit 1 Bit 2
26 Graphics Lab @ Korea University
Cohen-Sutherland Line
Clipping CGVR
P4 P’8
1000 P3 0000 0100
P6
Bit 3
1010 P’5 0010 0110
Bit 1 Bit 2
27 Graphics Lab @ Korea University
Polygon Clipping
CGVR
Before Clipping
28 Graphics Lab @ Korea University
Polygon Clipping
CGVR
After Clipping
29 Graphics Lab @ Korea University
Sutherland-Hodgeman Polygon
Clipping CGVR
P2 P1
Window
Boundary Inside
Outside
P3 P5
P4
35 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary Inside
Outside
P3 P5
P4
36 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary Inside
Outside
P3 P5
P4
37 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary Inside
Outside
P3 P5
P4
38 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary P’ Inside
Outside
P3 P5
P4
39 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary P’ Inside
Outside
P3 P5
P4
40 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary P’ Inside
Outside
P3 P5
P4
41 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary P’ P” Inside
Outside
P3 P5
P4
42 Graphics Lab @ Korea University
Clipping to a Boundary
CGVR
P2 P1
Window
Boundary P’ P” Inside
Outside
2D Primitives
Image
44 Graphics Lab @ Korea University
Viewport Transformation
CGVR
Viewport
Window
World-coordinate area selected for display
What is to be viewed
Viewport
Area on the display device to which a window is
mapped
Where it is to be displayed
Window-to-Viewport Mapping
Window Viewport
wy2 vy2