csi 421: computer graphics csi 421: computer graphics | [email protected]

26
CSI 421: Computer Graphics CSI 421: Computer Graphics | [email protected]

Upload: nancy-hicks

Post on 22-Dec-2015

297 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics

CSI 421: Computer Graphics | [email protected]

Page 2: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

2CSI 421: Computer Graphics | [email protected]

Page 3: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

3

Page 4: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 5: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 6: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 7: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 8: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 9: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 10: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

10

CSI 421: Computer Graphics | [email protected]

Page 11: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

P=(xp, yp) is pixel chosen by the algorithm in previous step

To calculate d incrementally we require dne w 1

If d > 0 then choose NE If d < 0 then choose E ( x + 1, y

+ )p 2

( x + 2, y +

3 )p

2

P=(xp, yp)

Exp

xp+1xp+2

Pre

vio

us Curr

ent N

ex

t

yp

MNE

NE

M

CSI 421: Computer Graphics | [email protected]

Page 12: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 13: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 14: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 15: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 16: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 17: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 18: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 19: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 20: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

The most common side effects when

working with raster devices are:

1. Aliasing

2. Unequal intensity

3. Overstrike

4. Picket fence problem

CSI 421: Computer Graphics | [email protected]

Page 21: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

Refers to the plotting of a point in a location other than its true location in order to fit the point into the raster.

Consider equation y = mx + bFor m = 0.5, b = 1 and x = 3 :

y = 2.5

So the point (3,2.5) is plotted at alias

location (3,3) RemedyApply anti-aliasing algorithms. Most of these algorithms introduce extra pixels and pixels are intensified proportional to the area of that pixel covered by the object.

CSI 421: Computer Graphics | [email protected]

Page 22: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

CSI 421: Computer Graphics | [email protected]

Page 23: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

Human perception of light is dependent on Density and Intensity of light

source. 1

Thus, on a raster display with perfect squareness, a diagonal line of pixels will appear dimmer that a horizontal or vertical line.

Remedy1. If speed of scan conversion is main then ignore2. By increasing the number of pixels in diagonal

lines3. By increasing the intensity of pixels on

diagonal lines.CSI 421: Computer Graphics | [email protected]

Page 24: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

The same pixel is written more than once.

This results in intensified pixels in case of photographic media, such as slide or transparency

RemedyCheck each pixel to see whether it has already been written to prior to writing a new point.

CSI 421: Computer Graphics | [email protected]

Page 25: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

Occurs when a user attempts to scan-convert an object that will not fit exactly in the raster.

CSI 421: Computer Graphics | [email protected]

RemedyLocal Aliasing: the distances between pickets in the picket fence will be kept as close to their true relative distance as possibleGlobal Aliasing: the overall length of the picket fence will be approximately correct by the spacing between pickets will be distorted.

Original Object Local aliasing Global aliasing

Page 26: CSI 421: Computer Graphics CSI 421: Computer Graphics | saleh.sabbir.aiub@gmail.com

Must Read:•Point conversion•DDA algorithm•Bresenham’s Algorithm•Solved problems (3.1-3.7)

Optional:

•Ellipse: Scan conversion

•Region filling algorithms

References:1. Text book – chapter 32. Wikipedia and google with topic name3. http://classes.cec.

wustl.edu/~cse452/lectures/lect02_ScanConvert_2pp.pdf

CSI 421: Computer Graphics | [email protected]