Computer Graphics Lec_6.pdf

17
Projections

description

Projections

Transcript of Computer Graphics Lec_6.pdf

Page 1: Computer Graphics Lec_6.pdf

Projections

Page 2: Computer Graphics Lec_6.pdf

3D viewing.Inherently more complex than 2D case.– Extra dimension (!)– Many display devices are only 2D.Need to use a projection to transform3D object or scene to 2D display device.Need to clip against a 3D view volume.– Six planes.– View volume probably truncated pyramid.

Page 3: Computer Graphics Lec_6.pdf

Taxonomy of Projections

Page 4: Computer Graphics Lec_6.pdf

Projections.Transforms points in a coordinate systemof dimension n into points in one of lessthan n.The projection is defined by straight linescalled projectors.Projectors emanate from a centre ofprojection, pass through every point in theobject and intersect a projection surfaceto form the 2D projection.

Page 5: Computer Graphics Lec_6.pdf

Projections.In graphics we only deal with planarprojections – where the projection surfaceis a plane.– Most cameras employ a planar film plane.– But… the retina is not a plane.Only deal with geometric projections – theprojectors are straight lines.– Many projections used in cartography are

either non-geometric or non-planar.Exception – Image-based rendering.

Page 6: Computer Graphics Lec_6.pdf

Projections.Henceforth refer to planar geometricprojections as just: projections.Two classes of projections :– Perspective.– Parallel.

A

B

A

B

A

B

A

B

Centre ofProjection.

Centre ofProjectionat infinity

ParallelPerspective

Page 7: Computer Graphics Lec_6.pdf

Perspective projections.Defined by projection plane and centre of projection.Visual effect is termed perspective foreshortening.– The size of the projection of an object varies inversely

with distance from the centre of projection.– Similar to a camera - Looks realistic !

Not useful for metric information.– Parallel lines do not in general project as parallel.– Angles only preserved on faces parallel to the projection

plane.– Distances not preserved.

Page 8: Computer Graphics Lec_6.pdf

Perspective

The first ever painting(Trinity with the Virgin,St. John and Donors)done in perspective byMasaccio, in 1427.

Page 9: Computer Graphics Lec_6.pdf

Perspective projections.

• A set of lines not parallelto the projection planeconverge at a vanishingpoint.– Can be thought of in 3D as

the projection of a point atinfinity.

– Homogeneous coordinateis 0 (x,y,0)

Page 10: Computer Graphics Lec_6.pdf

Perspective projections.Lines parallel to a principal axis converge at an axis vanishingpoint.– Perspective categorized according to the number of such points.– Corresponds to the number of axis cut by the projection plane.

x

y

z z

x

y

Page 11: Computer Graphics Lec_6.pdf

Perspective projections.

z

x

y

Projection plane

xz

y

Lines parallel to a principal axis converge at anaxis vanishing point.– Categorized according to the number of such points– Corresponds to the number of axes cut by the

projection plane.

Page 12: Computer Graphics Lec_6.pdf

1-point projection.

Projection plane cuts 1 axis only.

Page 13: Computer Graphics Lec_6.pdf

1-point perspective.

A painting (The Piazzaof St. Mark, Venice)done by Canaletto in1735-45 in one-pointperspective.

Page 14: Computer Graphics Lec_6.pdf

2-point perspective.

y

z x

Projection plane

Page 15: Computer Graphics Lec_6.pdf

2-point perspective.

Painting in two pointperspective by EdwardHopperThe Mansard Roof1923 (240 Kb);Watercolor on paper, 133/4 x 19 inches;The Brooklyn Museum,New York

Page 16: Computer Graphics Lec_6.pdf

3-point perspective.

Adds little beyond 2-point perspective.

y

z x

Projection plane

A painting (CityNight, 1926) byGeorgia O'Keefe, thatis approximately inthree-pointperspective.

Page 17: Computer Graphics Lec_6.pdf

Center of projection is at infinityDirection of projection (DOP) same for all points