Professional Documents
Culture Documents
2D Viewing: CGVR - Korea.ac - KR
2D Viewing: CGVR - Korea.ac - KR
2D Viewing
cgvr.korea.ac.kr
Contents
3D Rendering Pipeline
2D Rendering Pipeline
Clipping
CGVR
Viewport Transformation
Scan Conversion
Summary of Transformation
3D Rendering Pipeline
3D Primitives
CGVR
3D Modeling Coordinates
Model
Model Transformation
Transformation
3D World Coordinates
Lighting
Lighting
3D World Coordinates
Viewing
Viewing Transformation
Transformation
3D Viewing Coordinates
Projection
Projection Transformation
Transformation
2D Projection Coordinates
Clipping
Clipping
2D Projection Coordinates
Viewport
Viewport Transformation
Transformation
2D Device Coordinates
Scan
Scan Conversion
Conversion
Image
2D Device Coordinates
Graphics Lab @ Korea
3D Rendering Pipeline
3D Primitives
CGVR
3D Modeling Coordinates
Model
Model Transformation
Transformation
3D World Coordinates
Lighting
Lighting
3D World Coordinates
Viewing
Viewing Transformation
Transformation
3D Viewing Coordinates
Projection
Projection Transformation
Transformation
2D Projection Coordinates
Clipping
Clipping
2D Projection Coordinates
Viewport
Viewport Transformation
Transformation
2D Device Coordinates
Scan
Scan Conversion
Conversion
Image
2D Device Coordinates
Graphics Lab @ Korea
2D Rendering Pipeline
CGVR
3D Primitives
2D Primitives
Clipping
Clipping
Viewport
Viewport Transformation
Transformation
Scan
Scan Conversion
Conversion
Image
Graphics Lab @ Korea
2D Rendering Pipeline
CGVR
3D Primitives
2D Primitives
Clipping
Clipping
Viewport
Viewport Transformation
Transformation
Scan
Scan Conversion
Conversion
Image
Graphics Lab @ Korea
Clipping
CGVR
World
Coordinates
Graphics Lab @ Korea
Clipping
CGVR
Clipping
CGVR
Points
Lines
Polygons
Circles
etc.
Point Clipping
CGVR
wy2
Inside
Inside ==
(x>=wx1)
(x>=wx1) &&
&&
(x<=wx2)
(x<=wx2) &&
&&
(x, y)
(y>=wy1)
(y>=wy1) &&
&&
(y<=wy2);
(y<=wy2);
wy1
wx1
wx2
Line Clipping
CGVR
P1
P4
P3
P2
P6
P5
P8
P10
P9
Before Clipping
Graphics Lab @ Korea
Line Clipping
CGVR
P4
P8
P3
P6
P5
After Clipping
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P1
P4
P3
P2
P6
P5
P8
P10
P9
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P3
P8
0100
0000
P6
0010
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P3
P8
0100
0000
P6
0010
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P3
P8
0100
0000
P6
1010
P5
Bit 1
0010
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
1010
P5
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
1010
P5
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0100
0000
P6
P5
1010
Bit 1
0010
P10
P9
Bit 4
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P9
Bit 3
0110
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P90110
Bit 3
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
P8
0000
0100
P6
P5
1010
Bit 1
0010
Bit 4
P10
P90110
Bit 3
Bit 2
Graphics Lab @ Korea
Cohen-Sutherland Line
Clipping
CGVR
0001
P7
0101
P4
1000
P3
Bit 4
P8
0000
0100
P6
P5
1010
Bit 1
Bit 3
0010
0110
Bit 2
Graphics Lab @ Korea
Polygon Clipping
CGVR
Before Clipping
Graphics Lab @ Korea
Polygon Clipping
CGVR
After Clipping
Graphics Lab @ Korea
Sutherland-Hodgeman
Polygon Clipping
CGVR
Sutherland-Hodgeman
Polygon Clipping
CGVR
Sutherland-Hodgeman
Polygon Clipping
CGVR
Sutherland-Hodgeman
Polygon Clipping
CGVR
Sutherland-Hodgeman
Polygon Clipping
CGVR
Clipping to a Boundary
CGVR
P1
Window
Boundary
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary P
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary P
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary P
Inside
P5
P3
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
Window
Boundary P
P3
Inside
P5
Outside
P4
Graphics Lab @ Korea
Clipping to a Boundary
CGVR
P1
P
Inside
Outside
2D Rendering Pipeline
CGVR
3D Primitives
2D Primitives
Clipping
Clipping
Viewport
Viewport Transformation
Transformation
Scan
Scan Conversion
Conversion
Image
Graphics Lab @ Korea
Viewport Transformation
CGVR
Image
Viewport
Window
CGVR
Viewport
Viewport Transformation
CGVR
Window-to-Viewport Mapping
wy2
Window
(wx, wy)
wy1
wx1
wx2
Screen Coordinates
vy2
Viewport
(vx, vy)
vy1
vx1
vx2
Image Coordinates
vx
vx == vx1
vx1 ++ (wx
(wx wx1)
wx1) ** (vx2
(vx2 vx1)
vx1) // (wx2
(wx2 wx1);
wx1);
vy
vy == vy1
vy1 ++ (wy
(wy wy1)
wy1) ** (vy2
(vy2 vy1)
vy1) // (wy2
(wy2 wy1);
wy1);
Graphics Lab @ Korea
2D Rendering Pipeline
CGVR
3D Primitives
2D Primitives
Clipping
Clipping
Viewport
Viewport Transformation
Transformation
Scan
Scan Conversion
Conversion
Image
Graphics Lab @ Korea
Scan Conversion
Definition
CGVR
Example
P2
P3
Graphics Lab @ Korea
CGVR
Simple Algorithm
L1
L3
L2
Graphics Lab @ Korea
CGVR
dy
dx
CGVR
Triangle
Quadrilateral
Convex
Star-Shaped
Concave
Self-Intersecting
Holes
CGVR
L2
L5
L2
L5B
L5A
L3
L3
L4
Convex Polygon
L4
Concave Polygon
Graphics Lab @ Korea
CGVR
Odd-Parity Rule
Concave
Self-Intersecting
With Holes
Graphics Lab @ Korea
CGVR
Triangle
Polygon
Graphics Lab @ Korea
CGVR
Summary of Transformation
CGVR
P(x, y, z)
3D Object Coordinates
Modeling
Modeling
Transformation
Transformation
3D World Coordinates
Viewing
Viewing
Transformation
Transformation
3D Viewing Coordinates
Projection
Projection
Transformation
Transformation
2D Projection Coordinates
Window-to-Viewport
Window-to-Viewport
Transformation
Transformation
2D Device Coordinates
P(x, y)
Graphics Lab @ Korea