Please enable JavaScript.
Coggle requires JavaScript to display documents.
Rasterisation (scan conversion) (Line Drawing Algorithm (limitations…
Rasterisation (scan conversion)
Line Drawing Algorithm
Digital Differential Analyser (DDA) Algorithm
disadvantages
has to deal with floating arithmetic and operations which is time consuming
accumulation of round errors of floating point increment can cause calculated pixel positions to drift away from the true line path
not very effiicient in term of speed and accuracy
Bresenham's Algorithm
avoids floating-point arithmetic
midpoint test
limitations
raster displays have pixels as rectangles
aliasing
stair-case artifacts, varying line intensity bcoz low resolution
clipping
artifacts due to round-off of clipped end points
antialiasing
antialiasing techniques involved some form of blurring to reduce contrast, smoothen image
effects
distant objects may appear entirely
objects can brink on and off in animations
Circle Drawing Algorithm
Aliasing
Fill-Algorithms
seed-fill Algorithm
start fill an interior "seed" point and grow
pixel-based descriptions
definition:
region R is the set of all pixels having color C that re connected to a given pixel S
4-adjacent
8-adjacent
4-connected
8-connected
Boundary fill
start at an inside position and paint the interior, pixel by pixel, which the desired color until the boundary color is encounterd
Flood fill
start at an inside position and 'repaint' all pixels that are currently set to a certain color with the desired color
Area fill issues
problem with 4-connected approach
the 8-connected approach solves this problem but
wasteful if area can be filled with 4-connected approach
highly recursive, many levels of recursion will take time and may cause stack overflow
Span-based seed fill algorithm
goal
: improved performance and reduce memory
fills horizontal pixel spans across scan lines, instead of proceeding to 4-connected or 8-connected neighbouring pixels
Polygon Scan Conversion
fill the interior one raster scan line at a time
geometric descriptions
What is Rasterisation?
Determine which pixels that are inside the primitives specifies by a set of vertices
computation of pixel positions that represent a primitive
circles
lines
polygons