cg7_2013 - Computer Graphics Lecture 7 Rasterization Taku...

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

View Full Document Right Arrow Icon
± (omputer ,raphics 1ecture ² 7asterization 9aku 0omura
Background image of page 1

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

View Full Document Right Arrow Icon
± 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´
Background image of page 2
Background image of page 3

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

View Full Document Right Arrow Icon
± 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
Background image of page 4
± 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?
Background image of page 5

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

View Full Document Right Arrow Icon
± 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´
Background image of page 6
± 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!
Background image of page 7

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

View Full Document Right Arrow Icon
Background image of page 8
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
Background image of page 9

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

View Full Document Right Arrow Icon
Background image of page 10
Background image of page 11

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

View Full Document Right Arrow Icon
Background image of page 12
Background image of page 13

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

View Full Document Right Arrow Icon
Background image of page 14
Background image of page 15

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

View Full Document Right Arrow Icon
Background image of page 16
Background image of page 17

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

View Full Document Right Arrow Icon
Background image of page 18
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
Background image of page 19

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

View Full Document Right Arrow Icon
± Midpoint algorithm \UOS 8OSVUOTZ7OTt±OTZ ^²³_²³^´³_´µ a OTZ S^(^´¶^²' OTZ S_(_´¶_²' OTZ S(´·S_¶S^' OTZ OTRXt0(´·S_' OTZ OTRX90(´·±S_¶S^µ' ^(^²' _(_²'
Background image of page 20
Image of page 21
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 Right Arrow Icon
Ask a homework question - tutors are online