{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# cg7_2013 - Computer Graphics Lecture 7 Rasterization Taku...

This preview shows pages 1–21. Sign up to view the full content.

± (omputer ,raphics 1ecture ² 7asterization 9aku 0omura

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
± 7asterization •&fter projection² the polygons are still in the continuous screen space •>e need to decide which pixels to lit how much •9his is called rasterization ³or scan conversion´
)verview [email protected]@tion •%ine [email protected]@tion •.olygon [email protected]@tion [email protected] ±lgorithm •´ividing polygons into [email protected]

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
± Rasterizing Lines Converting a continuous object in the world into a discrete object in the computer We need to lit the pixels instead of drawing a continuous line
± Simple Line From linear algebra y = m x ² n Simple approach" increment x³ calculate y Then cast y to an integer ´x³ ´intµyµ Will this work?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
± Does it Work? It seems to work okay for lines with a slope of ² or less³ But doesn’t work well for lines with slope greater than ² Lines become more discontinuous in appearance We must add more than ² pixel per column to make it work´
± Use Symmetry Increment along x²axis if dy<dx else increment along y²axis But still we need to do a lot of floating point arithmetic!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Testing above or below a line F±x²y³ = ax ´ by ´ c = µ¶ If b < µ² F > µ if the line is above the point F < µ if the line is below the point

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Summary of mid±point algorithm Start point is simply first endpoint ² [ Oo \ O ³´ Calculate the initial value for d Choose between µ pixels at each step based upon the sign of a decision variable´ Update the decision variable based upon which pixel is chosen´ ●No floating point arithmetic needed

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
± Midpoint algorithm \UOS 8OSVUOTZ7OTt±OTZ ^²³_²³^´³_´µ a OTZ S^(^´¶^²' OTZ S_(_´¶_²' OTZ S(´·S_¶S^' OTZ OTRXt0(´·S_' OTZ OTRX90(´·±S_¶S^µ' ^(^²' _(_²'
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 51

cg7_2013 - Computer Graphics Lecture 7 Rasterization Taku...

This preview shows document pages 1 - 21. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online