Computer Graphics Lec_6.pdf

Post on 18-Jul-2016

12 views 2 download

description

Projections

transcript

Projections

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.

Taxonomy of Projections

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.

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.

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

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.

Perspective

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

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)

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

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.

1-point projection.

Projection plane cuts 1 axis only.

1-point perspective.

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

2-point perspective.

y

z x

Projection plane

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

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.

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