CS 184: COMPUTER GRAPHICS


PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

Lecture #15 -- We: 10/16, 2002.

Vanishing Points and Vanishing Lines

The vanishing point is the perspective image of the point where a bundle of parallel lines seem to converge. (Example: Road)
We can find this point by shooting a ray in the direction of the parallel bundle and finding its intercept with the imaging plane.
Ray bundles parallel to the imaging plane do not have vanishing points!

If you have multiple bundles of parallel lines in the same plane,
then all their vanishin points form a vanishing line (or a "horizon") -- example: "2-runway airfield".
Vanishing line = "horizon" of a plane = collection of the vanishing points of all the lines in the plane.
Parallel planes have the same vanishing line.
To find their vanishing line, pick the one through eye point and find intersection with imaging plane.

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.
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 ... ?
 

Overview and Classifications of Projections

Parallel Projections
   Orthographic (plan-view, elevation, isometric)
   Oblique (cabinet, cavalier)
Perspective Projections
    "N-point perspective"
 

POLL:  POSTPONE MIDTERM TILL WED. NOV. 6 ?

==> MIDTERM EXAM HAS BEEN POSTPONED TILL WED. NOV. 6
 

Polygon Filling, Rasterization

Conceptually: just paint in all the pixesl that are inside the contour ...
BUT: What is "inside" ? -- How do we determine this quickly ?

==> Our inside/outside tests will be based on the Winding Number of the polygon;
this number indicates how many full loops around the test point the contour performs.
If the winding number is zero, then the test point lies outside;
if it is a positive or negative non-zero number, the point is considered inside.
This is called the non-zero winding number test.
(Other graphics systems may use an odd-winding-number paradigm,
also called "on-off", or "exclusive-or", or "parity-based" inside/outside test.)

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.

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.

Run this Java applet that demonstrates scan conversion.
-- Which type of inside/outside testing does it employ ?

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.


Reading Assignment:

Study: 2ndEd:  Ch 7.8 - 7.10,
Study: 3rdEd:  Ch 8.9 - 8.11,

Current Homework Assignment:

ASG#6:  "Perspective Projections and Stereo Viewing"
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