COMP30019 Graphics and Interaction Perspective Geometry Adrian - - PowerPoint PPT Presentation

comp30019 graphics and interaction perspective geometry
SMART_READER_LITE
LIVE PREVIEW

COMP30019 Graphics and Interaction Perspective Geometry Adrian - - PowerPoint PPT Presentation

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective COMP30019 Graphics and Interaction Perspective Geometry Adrian Pearce Department of Computing and Information Systems University


slide-1
SLIDE 1

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

COMP30019 Graphics and Interaction Perspective Geometry

Adrian Pearce

Department of Computing and Information Systems University of Melbourne

The University of Melbourne

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-2
SLIDE 2

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Lecture outline

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-3
SLIDE 3

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective geometry

How are three-dimensional objects projected onto two-dimensional images? Aim: understand point-of-view, projective geometry. Reading:

◮ Foley Sections 6.1 to 6.4 (excluding example 6.1, we’ll

cover matrices later).

◮ Akenine-Moller Section 2.3.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-4
SLIDE 4

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Viewing

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-5
SLIDE 5

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Viewport

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-6
SLIDE 6

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Geometry of image formation

Mapping from 3D space to 2D image surface, more specifically, a mapping from 3D directions (rays to/ from the observer).

◮ You can think perspective as a transformation as a way of

moving from a higher dimensional image to a lower dimensional form.

◮ The X, Y, Z points in the three dimensional world,

sometimes called voxels, are transformed in to x, y pixels in a two-dimensional image. Simplest device that does this is the pin-hole camera that gives perspective projection. Practical cameras with lenses ideally give the same projection, aside from greater light gathering, and issues like focus.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-7
SLIDE 7

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Pinhole Camera

  • bject in

3D scene image of object (upside down) for image (maybe light-tight box pinhole in box light ray from object projection screen translucent waxed paper)

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-8
SLIDE 8

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective geometry

(X,Y,Z) O Z x f X

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-9
SLIDE 9

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective geometry

◮ Basically an abstraction of pin-hole camera. ◮ Look at XOZ plane (same thing happens in YOZ plane). ◮ Actual point in 3D space is (X, Y, Z) ◮ 0 is origin (focal point) or centre of projection. ◮ Z is distance from actual point to origin. ◮ f is focal distance (focal length). ◮ x is the image (upside down) with respect to real world.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-10
SLIDE 10

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Virtual camera

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-11
SLIDE 11

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Virtual camera geometry

(X,Y,Z) O Z X f x

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-12
SLIDE 12

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Virtual camera geometry

◮ Image projection surface imagined to be in front of

projection centre.

◮ Geometrically equivalent ◮ Often more convenient to think about projection

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-13
SLIDE 13

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective Formulas

Point P = (X, Y, Z) in 3D space has projection (x, y) in the image where x f = X Z y f = Y Z

  • r

x = Xf Z y = Yf Z f being the “focal distance” (sometimes f is called d). Look at similar triangles in the previous diagram.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-14
SLIDE 14

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective Formulas

◮ Look at perspective projection diagram to convince

yourself of this — triangles xOf and XOZ have the same proportions.

◮ Rearranging gives equations shown below. ◮ These formulas apply only for this special coordinate

system, sometimes called camera-centred coordinates, for which perspective projection has a particularly simple form.

◮ For other coordinate systems, some 3D transformation will

be necessary (see later).

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-15
SLIDE 15

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Camera transformation

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-16
SLIDE 16

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Centre of projection

Projectors Center of projection Projection plane A' A B (a) Projectors Projection plane A' A B (b) B' B' Center of projection at infinity

Foley, Figure 6.03

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-17
SLIDE 17

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

One point perspective projection (Foley, Figure 6.04)

y z x y z x z-axis vanishing point z-axis vanishing point

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-18
SLIDE 18

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

One-point perspective projection (Foley, Figure 6.05)

Projection plane normal Center of projection Projection plane z x y

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-19
SLIDE 19

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

“Two-point” perspective

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-20
SLIDE 20

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

“Three-point” perspective

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-21
SLIDE 21

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Vanishing points

◮ In 3D, parallel lines meet only at infinity, so the vanishing

point can be thought of as the projection of a point at infinity.

◮ If the set of lines is parallel to one of the three principal

axes, the vanishing point is called an axis vanishing point.

◮ So called “one-point”, “two-point”, and “three-point”

perspectives are just special cases of perspective projection, depending on how image plane lines up with significant planes in scene.

◮ Talking about these cases specifically is mainly an artifact

  • f artists or architects dealing with horizontals and verticals

in built environments.

◮ In fact, there are an infinity of vanishing points, one for

each of the infinity of directions in which a line can be

  • riented.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-22
SLIDE 22

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

House example (Foley Section 6.4)

y x (8, 16, 30) (16, 10, 30) (16, 0, 30) (0, 10, 54) (16, 0, 54) z

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-23
SLIDE 23

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

One-point, centred perspective projection example

z v u VUP VRP PRP = (8, 6, 30) DOP n CW Window on view plane VPN y x

Foley Figures 6.21 and 6.22

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-24
SLIDE 24

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Exercise

Which of the below is the centre of project in Foley Figure 6.22?

◮ VRP (view reference point) ◮ PRP (projection reference point) ◮ VPN (view plane normal) ◮ DOP (direction of projection) ◮ VUP (view-up vector)

Is the view plane inbetween the centre of projection and the house or behind the centre of projection?

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-25
SLIDE 25

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Two-point perspective projection example

In a two-point projection of a house, left, the viewplane (defined by the view plane normal, VPN), right, cuts the z and x axes (Foley Figures 6.17 and 6.25).

y x z v u VPN View plane

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-26
SLIDE 26

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Parallel projection

◮ Parallel projection introduces no perspective distortion -

centre of projection plane (focal point) is at infinity

◮ Along with its variants it is useful in engineering drawings,

where measurements must be taken.

◮ oblique projection if view plane is not perpendicular to

projection.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-27
SLIDE 27

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Geometric project classes

Subclasses of planar geometric projections (Foley Figure 6.10).

Planar geometric projections Front elevation Side elevation Top (plan) Parallel Perspective Orthographic Oblique One-point Cabinet Cavalier Other Two-point Three-point Axonometric Isometric Other

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-28
SLIDE 28

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Perspective of the human eye

Human eye effectively uses a kind of “spherical” projection: Retina is curved, though projection centre (in lens) isn’t at centre of the eyeball (therefore not planar geometric projection).

◮ Doesn’t exactly match perspective projection. ◮ Only a problem for very wide fields of view.

Perspective is basically the right projection for putting a 3D scene onto a flat surface for human viewing.

◮ Other projections are possible for special effects, e.g.

“fish-eye” lens.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry

slide-29
SLIDE 29

Introduction to perspective geometry Perspective Geometry Virtual camera Centre of projection Human perspective

Summary

◮ Perspective geometry is based loosely on the pin-hole

camera model that maps 3D points onto a 2D image plane

◮ The image plane may thought of either behind a focal point

  • r in between a vanishing point and the object.

◮ Computer graphics largely concerns planar geometric

projections, generally perspective projection and sometimes parallel projection for specific applications.

◮ One-point, two-point and three-point projection variants

arise according to how many times the viewplane cuts the axis planes.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionPerspective Geometry