CS 184: COMPUTER GRAPHICS
PREVIOUS
< - - - - > CS
184 HOME < - - - - > CURRENT
< - - - - > NEXT
MIDTERM EXAM will be on Tuesday, November 9, in class.
Graphics Job Listing: restoring frescos ...
Lecture #17 -- Tu: 10/26, 2004.
Review: Vanishing Points and Vanishing Lines
The perspective image of a straight line is also a straight line
!
Use parameterized representation;
apply distributive law to transformation (linearized by the use of homogeneous
coordinates!).
P(t) = (1-t)*A + (t)*B
P'(t) = T*P(t) {for every point} = T*[ (1-t)*A + (t)*B ]
Because T is described with a linear matrix: P'(t) = (1-t)*T*A + (t)*T*B
P'(t) = (1-t)*A' + (t)*B' { with A' = T*A, and B' = T*B }.
So, if all this is so nice and linear ...
-- why can the perspective images of line segments
go through infinity (if we don't clip) ?
-- is the image of the mid-point of a line segment, in the middle of the imaged line segment ?
-- is the perspective transformation really a linear operation ?? ( -- Only in 4D; not in 3D after division!)
N-Point Perspectives
Art schools make a big fuss about drawing worlds with 1-,
2-, or 3-point perspectives,
showing the corresponding number of vanishing points for bundles of
parallel lines.
However, this really only makes sense for "brick" worlds with three
sets of dominant directions.
In worlds with more than 3 major directions in which we find many edges,
each such bundle of parallel lines, can, and typically will, produce
its own vanishing point.
The only situation when such a bundle does not produce a vanishing
point is when it lies parallel to the imaging plane.
Thus an octahedron
with 6 pairs of parallel edges can have 6 vanishing points,
and can thus be rendered in "6-point perspective" !
What is the minimum number of vanishing points that it can produce
?
-- Well, it can be oriented in such a way that one of its triangular
faces lies parallel
to the imaging screen;
then 3 parallel bundles do not have a vanishing
point, and there remain only three vanishing points.
Similarly, an icosahedron
(20 triangles) with 15 pairs of parallel edges can have
a maximum number of 15 vanishing points and a minimum number of 12.
What are the maximum and minimum number for a hexagonal prism
? (Max = 4, Min = 1)
or for a dodecahedron
... ?
Parallel Projections
Orthographic (plan-view, elevation, isometric)
Oblique (cabinet, cavalier)
Perspective Projections
"N-point perspective"
Review: Rendering Model
What is "inside" of a complicated polygon ?
Now in this last phase, we have to be very pedantic about every detail.
-- We don't want spurious pixels lying around the
screen!
Conceptually, we define the inside of a polygon by the
non-zero winding number test.
We "turn on" all the pixels that have a sampling point that
falls inside the polygon contour.
The sampling point chosen for this course is the lower left-hand
corner.
Now that we know what is "inside", we can "paint" or "turn on" the inside
pixels.
But what do we do with pixels that fall "on the edge (contour)" of
the polygon?
This causes ambiguities, and competitive conflicts ... -- we need a
clean solution !
==> Our Sampling Paradigm.
We specify that polygons also "own" their left- and downward-facing
contour
segments;
sampling points falling on such edges also get turned on with the polygon
color.
Finally, if a vertex falls on a sampling point and is shared
by many adjoining but not overlapping polygons,
then that pixels gets assigned to the polygon that "owns" the region
immediately to the right of that point
(i.e., in the +x direction).
A
pictorial description of the requirements for a proper scan conversion
algorithm.
Look at section
5 of the notes on scan conversion for more explicit examples of rasterization.
Now we want to implement a rasterization algorithm in an efficient manner.
Several algorithms are used in praxis. Some are based on "flood-filling".
We will study and implement an algorithm based on a sweeping
scan-line.
Now we want to implement a rasterization algorithm in an efficient manner.
Several algorithms are used in praxis. Some are based on "flood-filling".
We will study and implement an algorithm based on a sweeping
scan-line.
Processing one polygon at a time:
Datastructures:
-- Scene Graph -- Display List -- Edge Table
-- Active Edge List.
Preprocessing:
-- Bucket-sort all polygon edges into the Edge Table.
-- Inserting
edges into scan-line buckets (details)
Scan-line Processing:
-- Details
of scan-line processing on active edge list
Reading Assignment:
Study: 2ndEd: Ch 7.8 - 7.10,
Study: 3rdEd: Ch 8.9 - 8.11,
New Homework Assignment:
ASG#7
"Scan Conversion and Z-Buffering"
This assignment can be done with ANY
PARTNER
-- possibly the one with whom you might do
the final project.
PREVIOUS
< - - - - > CS
184 HOME < - - - - > CURRENT
< - - - - > NEXT
Page Editor: Carlo H. Séquin