lecture 4 projections - orthographic - parallel - perspective - - PowerPoint PPT Presentation

lecture 4
SMART_READER_LITE
LIVE PREVIEW

lecture 4 projections - orthographic - parallel - perspective - - PowerPoint PPT Presentation

lecture 4 projections - orthographic - parallel - perspective + vanishing points view volume (frustum) Orthographic projection How to map 3D scene point (say in camera coordinates) to a 2D image point? The simplest method: just drop


slide-1
SLIDE 1

lecture 4

projections

  • orthographic
  • parallel
  • perspective + vanishing points

view volume (frustum)

slide-2
SLIDE 2

Orthographic projection

How to map 3D scene point (say in camera coordinates) to a 2D image point? The simplest method: just drop the z coordinate. Similar method: project to z=0 plane.

slide-3
SLIDE 3

Orthographic projection to z=0 plane

slide-4
SLIDE 4

Orthographic projection can be in any direction. Example: x (side), y (top), z (front)

slide-5
SLIDE 5

Orthographic projection (in general) :

Project onto a plane, and in a direction of the plane's normal (i.e. perpendicular to plane)

slide-6
SLIDE 6

Isometric projection:

  • rthographic projection onto x + y + z = 0.

x, y, z all project to the same length in the image.

slide-7
SLIDE 7

Parallel projection

Example: Project to z=0 plane. But now project in general direction (px, py, pz). (px, py, pz)

slide-8
SLIDE 8

How can we calculate the projection point ? First, use z coordinate to solve for t. Then plug in:

slide-9
SLIDE 9
slide-10
SLIDE 10

How can we write parallel projection using a 4x4 matrix ?

slide-11
SLIDE 11

Example of parallel projection: cabinet projection x, y axes of cube project to the same length in the image, but z axis projects to half that length.

It doesn't have to be 45 deg. 30 deg is also common.

slide-12
SLIDE 12

cavalier cabinet

Which of these looks more like a cube? (perceptual issue !)

slide-13
SLIDE 13

Architects and interior designers know these well. (But you don't need to memorize the names.)

slide-14
SLIDE 14

Perspective Projection

slide-15
SLIDE 15

In real imaging systems (photography, human eye), real images are upside down and backwards.

slide-16
SLIDE 16

In computer graphics, the projection surface is in front of the viewer (negative z). Think of the viewer as looking through a window.

slide-17
SLIDE 17

Alberti's window (1435).

Illustration below was drawn in 1531.

slide-18
SLIDE 18

"Center of projection"

All scene points project towards the viewer (origin).

slide-19
SLIDE 19

view from side

Similar triangles implies:

slide-20
SLIDE 20

view from above

Similar triangles implies:

slide-21
SLIDE 21

Re-write in homogeneous coordinates:

slide-22
SLIDE 22
slide-23
SLIDE 23

We can consider these to be equivalent transformations.

slide-24
SLIDE 24

Vanishing Points

Under perspective projection, parallel lines in 3D meet at a single point in the image. How to express this mathematically?

slide-25
SLIDE 25

Parallel lines in 3D

Two different (x0,y0,z0) define two different lines. Vanishing points ? Let t -> infinity and look at projection.

slide-26
SLIDE 26
slide-27
SLIDE 27

The set of parallel lines all go to a point at infinity (vx, vy, vz, 0). This point projects to the image at a vanishing point.

slide-28
SLIDE 28

n-point Perspective (n = 1, 2, 3)

An image has n-point perspective if it has n finite vanishing points. Many man-made scenes contain three sets of (perpendicular) parallel lines. e.g. A building may be a scaled cube. A cube defines three points at infinity, and hence three vanishing points.

slide-29
SLIDE 29

1-point perspective (not 3)

Many man-made scenes contain three sets of Lines that are parallel to camera x axis and y axis have vanishing points at infinity.

slide-30
SLIDE 30

2-point perspective (not 3)

Many man-made scenes contain three sets of Lines that are parallel to camera y axis have a vanishing point at infinity.

slide-31
SLIDE 31

All vanishing points are finite (but are outside window).

3-point perspective

Many man-made scenes contain three sets of

slide-32
SLIDE 32

Recall the idea of a viewer looking through a window.

slide-33
SLIDE 33

view from side

slide-34
SLIDE 34

view from above

slide-35
SLIDE 35
slide-36
SLIDE 36

View volume (frustum) "truncated pyramid"

slide-37
SLIDE 37

OpenGL gluPerspective(

slide-38
SLIDE 38
slide-39
SLIDE 39

OpenGL

A more general definition of a view volume/frustrum. In the z = - near plane, define:

glFrustum(left, right, bottom, top, near, far)

slide-40
SLIDE 40

Application 1: 3D stereo displays

slide-41
SLIDE 41

https://www.youtube.com/watch?v=Jd3-eiid-Uw

Application 2: head-tracked displays

slide-42
SLIDE 42

Assignment 1 to be posted end of next week. Programming language will be Python. (Python/OpenGL version and installation details possibly available before then.)