{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture06 - Output Primitives (Part II)

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

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

Output Primitives Output Primitives Part II Line-Drawing Algorithms

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

View Full Document
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
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

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

View Full Document
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
Decision Parameter Decision Parameter p k negative d 1

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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
Ask a homework question - tutors are online