Docsity

Computer Graphics I: 3D Viewing and Projections - Prof. David E. Breen, Assignments of Computer Graphics

Partial preview of the text

Download Computer Graphics I: 3D Viewing and Projections - Prof. David E. Breen and more Assignments Computer Graphics in PDF only on Docsity!

1

CS 430/

Computer Graphics I

3D Viewing

Week 6, Lecture 12 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu

2

Overview

  • 3D Viewing
  • 3D Projective Geometry
  • Mapping 3D worlds to 2D screens
  • Introduction and discussion of

homework

Lecture Credits: Most pictures are from Foley/VanDam; Additional and extensive thanks also goes to those credited on individual slides Pics/Math courtesy of Dave Mount @ UMD-CP 1994 Foley/VanDam/Finer/Huges/Phillips ICG

4

From 3D Virtual World to 2D

Screen

  • Not unlike The Allegory of the Cave (Plato’s “Republic", Book VII)
  • Viewers see a 2D shadow of 3D world
  • How do we create this shadow?
  • How do we make it as realistic as possible? Pics/Math courtesy of Dave Mount @ UMD-CP

5

History of Linear Perspective

  • Renaissance artists
    • Alberti (1435)
    • Della Francesca (1470)
    • Da Vinci (1490)
    • Pélerin (1505)
    • Dürer (1525) Dürer: Measurement Instruction with Compass and Straight Edge http://www.handprint.com/HP/WCL/tech10.html

7

The 3D Problem:

(Slightly) Alternate Approach

  • Think of 3D viewing as taking a photo:
    • Select Projection
    • Specify viewing parameters
    • Perform trivial accept/reject test in 3D
    • Project the results onto the image plane
    • Clip lines to world window
    • Transform to viewport and draw

8

Creating a 3D View:

Parameterizing the Camera

Basic Ideas:

  • Camera has
    • location
    • lens (focal length)
    • projection type
  • World has
    • lights
    • colors
    • objects (visible and hidden surfaces) 1994 Foley/VanDam/Finer/Huges/Phillips ICG

10

Perspective Projections

  • Idea: lines not parallel to projection plane converge to a vanishing point (VP)
  • Lines extending to axis VPs are parallel to either x, y or z axes
  • Projections characterized by # of axes cut by the projection plane 1994 Foley/VanDam/Finer/Huges/Phillips ICG

11

Perspective Projections:

Example

  • One-point perspective
  • z axis vanishing point
  • Projection plane cuts only the z axis 1994 Foley/VanDam/Finer/Huges/Phillips ICG

13

Perspective Projections:

Example

  • Two-point perspective, cutting x and z
  • Used commonly in CAD
  • Three-point projections are not much different 1994 Foley/VanDam/Finer/Huges/Phillips ICG

14

Parallel Projections

  • Two types, depending on projection direction vector and projection plane normal
  • Orthographic Projections
    • both vectors are the same
    • front-, top-, plan-, and side- elevation projections
  • Oblique Projections
    • vectors are different 1994 Foley/VanDam/Finer/Huges/Phillips ICG

16

Axonometric Orthographic

Projections

  • Projections to planes not normal to principle coordinate axes, i.e. showing several faces
  • The Isometric Projection
    • very common
    • projection plane at equal angles to each of the coordinate axes
    • 8 of them, one in each octant 1994 Foley/VanDam/Finer/Huges/Phillips ICG

17

Mercury Spacecraft

Oblique Projections

  • Cavalier - all lines (including receding lines) are made to their true length
  • Cabinet - receding lines are shortened by one-half their true length to approximate perspective fore- shortening 19

20

Oblique Projections are Good for

Illustrations