Lecture06 - Output Primitives (Part II)

Lecture06 - Output Primitives (Part II) - OutputPrimitives...

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

View Full Document Right Arrow Icon
Output Primitives Output Primitives Part II Line-Drawing Algorithms
Background image of page 1

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

View Full DocumentRight Arrow Icon
Bresenham’s Line Algorithm Bresenham’s Line Algorithm Based on integer calculation. Next pixel → (11, 10) or (11, 11)? Select the nearest point (to the actual path). At each sampling, increment is either 0 or 1. 16 15 14 12 11 10 9 8 8 9 10 11 12 13 14 15 16 13 Actual path
Background image of page 2
Consider the first condition: m < 1 (positive value) Bresenham’s increments: x by 1 y by 0 or 1 If m > 1 (positive value) Swap x & y
Background image of page 3

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

View Full DocumentRight Arrow Icon
Pixel Selection Pixel Selection If current pixel is at (x k , y k ): Next pixel to be plotted:(x Next pixel to be plotted:(x k+1 , y , y k+1 ) = (x ) = (x k+1 , y , y k ), or (x ), or (x k+1 , , y y k+1 )? )? Determined by the value of decision parameter, p k : ( 29 2 1 d d x p k - = y = mx + c x k y k x k+1 x k+2 y k+1 x k+1 y k y y k+1 d 2 d 1
Background image of page 4
Decision Parameter Decision Parameter p k negative d 1
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/05/2010 for the course COMPUTER S 876 taught by Professor Ch during the Spring '10 term at Amirkabir University of Technology.

Page1 / 8

Lecture06 - Output Primitives (Part II) - OutputPrimitives...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online