Send a link to your students to track their progress
72 Terms
1
New cards
Cohen–Sutherland example: outcode of (5,4) using Top-Bottom-Right-Left order
0000
2
New cards
Cohen–Sutherland example: classify the line from (2,7) to (9,8)
Trivially rejected, because 1001 AND 1010 = 1000 ≠ 0000
3
New cards
Cohen–Sutherland example: classify the line from (2,4) to (6,4)
Clipping required, because 0001 AND 0000 = 0000 but one point is outside
4
New cards
Visible segment of the clipped line from (2,4) to (6,4) with window BL = (3,1), UR = (8,6)
The visible segment is (3,4) to (6,4)
5
New cards
What is the graphics pipeline?
The graphics pipeline is the sequence of stages that transforms a mathematical scene description into the final image on the screen.
6
New cards
What are the main stages of the graphics pipeline?
Object Representation, Modeling Transformation, Lighting, Viewing Transformation, and Scan Conversion.
7
New cards
Simple graphics pipeline example
Object Representation: define a cube. Modeling Transformation: place it in the scene. Lighting: make one face brighter and another darker. Viewing Transformation: project the 3D cube into 2D. Scan Conversion: convert the projected shape into pixels.
8
New cards
What is modeling transformation?
Modeling transformation is the stage where an object is transformed from local coordinates into world coordinates.
9
New cards
Why is modeling transformation important?
Because it places an object in the correct position, size, and orientation in the scene.
10
New cards
What is lighting?
Lighting is the stage where the appearance of an object is determined according to how light interacts with its surface.
11
New cards
Simple lighting example
If a light source is above a cube, the top face appears brighter and the side faces appear darker.
12
New cards
What is scan conversion?
Scan conversion is the process of converting continuous geometric shapes into discrete pixels on the screen.
13
New cards
What is the main problem in scan conversion?
The main problem is aliasing, where edges and lines look jagged on the pixel grid.
14
New cards
How is the scan conversion problem solved?
It is solved using anti-aliasing, which smooths the jagged edges.
15
New cards
How can objects be represented in graphics?
Objects can be represented using point sample representation, boundary representation, space partitioning, and sweep representation.
16
New cards
What are the most important object representation techniques?
Point sample representation, boundary representation, space partitioning, and sweep representation.
17
New cards
How are boundaries represented?
Boundaries are represented by describing the outer surfaces of an object, often with polygon meshes.
18
New cards
What is mesh representation?
Mesh representation is a boundary representation method where an object surface is approximated using polygons.
19
New cards
What is a sweep surface?
A sweep surface is a 3D surface generated by moving a point, line, polygon, or curve along a path in space.
20
New cards
What is a surface of revolution?
A surface of revolution is a special case of a sweep surface created by rotating a 2D curve around an axis.
21
New cards
Example of surface of revolution
Rotating a semicircle around an axis generates a sphere.
22
New cards
What is DDA?
DDA (Digital Differential Analyzer) is a line drawing algorithm that generates intermediate points between two endpoints step by step.
23
New cards
DDA formula for dx and dy
dx = x2 - x1, dy = y2 - y1
24
New cards
DDA formula for steps
steps = max(|dx|, |dy|)
25
New cards
DDA formula for increments
x_inc = dx / steps, y_inc = dy / steps
26
New cards
DDA procedure
Start at (x1, y1), plot the point, then repeatedly add x_inc and y_inc until the final point is reached.
27
New cards
DDA example: line from (2,2) to (6,4) — increments
x_inc = 1, y_inc = 0.5
28
New cards
DDA example: line from (2,2) to (6,4) — points
(2,2), (3,2.5), (4,3), (5,3.5), (6,4)
29
New cards
What is Bresenham’s line drawing algorithm?
Bresenham’s line drawing algorithm is a fast line rasterization algorithm that uses integer arithmetic and a decision parameter.
30
New cards
Why is Bresenham line faster than DDA?
Because it avoids floating-point calculations and uses integer updates.
31
New cards
What is the decision parameter formula for Bresenham line when m < 1?
P0 = 2dy - dx
32
New cards
In Bresenham line for m < 1, what happens if Pk < 0?
Choose the East pixel: x(k+1) = xk + 1, y(k+1) = yk, and P(k+1) = Pk + 2dy
33
New cards
In Bresenham line for m < 1, what happens if Pk >= 0?