III. Projections - PaginaPrincipalaweb.info.uvt.ro/~petcu/grafica/g3e.pdf · Projectors at oblique...

Preview:

Citation preview

III. Projections

Imagephysics

Old definition

Definitions3D objects to 2D imageSolution Rn to Rm, m<n through a projectionThe projection lines (rays, projectors) cross a given point of the space, named projection center (viewing point) and each point of the object are intersecting the projection plane to form the projection.

Classification

Display = plate surface => plane gemetricalsurfaces? D = distance (viewing point, projection plane)

(a) D = infinity: parallel projections(b) D< infinity: perspective projections

Classification

(a) Perspective projection: plan & center of projection(b) Parallel projection: plan & projection direction

Other than planar projections

Why to use each?

Parallel projections used for engineering and architecture because they can be used for measurementsPerspective imitates eyes or camera and looks more natural

|| lines can convergeObjects farther away are more foreshortened (i.e., smaller) than closer ones

Further classification

Examples

History

Pespective projection

For right-angled forms whose face normalsare perpendicular to the x, y, z coordinate axes, number of vanishing points = number of principal coordinate axes intersected by projection planeOne Point Perspective (z-axis vanishing point)

y

x

y

x

z

z

Two and three point perspectives

Two Point Perspective(z, and x-axis vanishing points)Three Point Perspective(z, x, and y-axis vanishing points)

y

xz

y

x

z

y

z

x

y

xz

Perspective Projection

Used for:advertisingpresentation drawings for architecture, industrial design, engineeringfine art

Pros:gives a realistic view and feeling for 3D form of object

Cons:does not preserve shape of object or scale (except where object intersects projection plane)

Different from a parallel projection becauseparallel lines not parallel to the projection plane convergesize of object is diminished with distanceforeshortening is not uniform

Camera

Camera

Perspective projection

Perspective projection

One point perspective

One point perspective

Two point perspective

Three point Perspective

Perspective projection

Assume perspective proj. on plane z=0, with 1 point and C(x0,y0,z0) as projection centerThen P’ : x’=(x*z0-z*x0)/(z0-z), y’=(y*z0-z*y0)/(z0-z)For the perspective with 2 points: rotate around 1 axis + persp. roj. with 1 pointFor the perspective with 2 points: rotate around 2 axis + persp. proj. with 1 point

Ascending, descending

Use the vanishing points

Using the vanishing points

Parallel projectionsAssume object face of interest lies in principal plane, i.e., parallel to xy, yz, or zx planes. DOP = Direction of Projection, VPN = View Plane Normal1) Multiview Orthographic

VPN || a principal coordinate axisDOP || VPNshows single face, exact measurements

2) AxonometricVPN || a principal coordinate axisDOP || VPNadjacent faces, none exact, uniformly foreshortened (function of angle between face normal and DOP)

3) ObliqueVPN || a principal coordinate axisDOP || VPNadjacent faces, one exact, others uniformly

Multiview OrthographicUsed for:

engineering drawings of machines, machine partsworking architectural drawings

Pros:accurate measurement possibleall views are at same scale

Cons:does not provide “realistic” view or sense of 3D form

Usually need multiple views to get a three-dimensional feeling for object

Elevation – frontal view

Prop: maintain the distances and anglesDisadvantage: hard to understandFrontal view (projection on xOy plane):

such that x’=x, y’=y, z’=0

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

1000000000100001

Plan – top view

Projection on the plane xOz: Rx(-90o) + proj. on XOy:x’=x, y’=z, z’=0

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

1000000000100001

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−1000001001000001

Profile – side view

Projection on the plane xOz: Rx(-90o) + proj. on XOy:x’=z, y’=y, z’=0

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

1000000000100001

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−1000000100100101

Plan, elevation, profile

Front view: plane z=0, projection center at infinityon + halfaxisBack view: plane z=0, projection center at - infinityon - halfaxisLeft view: plane x=0, projection center at infinityon + halfaxisRight view: plane x=0, projection center at -infinityon - halfaxis

Plan, elevation, profile

Axonometric Projections

Same method as multiview orthographic projections, except projection plane not parallel to any of coordinate planes; parallel lines equally foreshortenedIsometric: Angles between all three principal axes equal (120º). Same scale ratio applies along each axisDimetric: Angles between two of the principal axes equal; need two scale ratiosTrimetric: Angles different between three principal axes; need three scale ratiosNote: different names for different views, but all part of a continuum of parallel projections of cube; these differ in where projection plane is relative to its cube

Isometric Projection

Construction of an isometric projection: projection plane cuts each principal axis by 45°

Axonometric projection

Obtained through 1-3 rotations around the axes + orthographic projection on xOyEx: OrtoxOyRx(u)Ry(v)

Isometric projection: v=arcsin(1/sqrt(3)),u=arcsin(1/2)

Isometric Projection

Used for:catalogue illustrationspatent office recordsfurniture designstructural design3d Modeling in real time (Maya, AutoCad, etc.)

Pros:don’t need multiple viewsillustrates 3D nature of objectmeasurements can be made to scale along principal axes

Cons:lack of foreshortening creates distorted appearancemore useful for rectangular than curved shapes

Still in use today when you want to see things in distance as well as things close up (e.g. strategy, simulation games)

Examples

SimCity IV StarCraft II

Dimetric

Parallel Proj.

Parallel proj.

Oblique Projections

Projectors at oblique angle to projection plane; view cameras have accordion housing, used for skyscrapersPros:

can present exact shape of one face of an object (can take accurate measurements): better for elliptical shapes than axonometric projections, better for “mechanical” viewinglack of perspective foreshortening makes comparison of sizes easierdisplays some of object’s 3D appearance

Cons:objects can look distorted if careful choice not made about position of projection plane (e.g., circles become ellipses)lack of foreshortening (not realistic looking)

Oblique projection

Main Types of Oblique Projections

Cavalier: Angle between projectors and projection plane is 45º. Perpendicular faces projected at full scale

Cabinet: Angle between projectors & projection plane: arctan(2) = 63.4º. Perpendicular faces projected at 50% scale

Examples

Projection plane parallel to circular face

Projection plane not parallel to circular face

Parallel projections

Different projections

Different projections

Different projections

Projective transformation – case 1

Projective transformation – case 1

x’/d=x/z, y’/d=y/z(X,Y,Z,W)=(x,y,z,z/d)(x’,y’,z’)=(X/W,Y/W,Z/W)=(xd/z,yd/z,d)

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

0/100010000100001

d

Mpersp=

Caz 1

Caz 1

Projective transformation – case 2

Projective transformation – case 2

x’/d=x/(z+d), y’/d=y/(z+d)(X,Y,Z,W)=(x,y,0,z/d+1)(x’,y’,z’)=(X/W,Y/W,Z/W)=(x/(z/d+1),y/(z/d+1),0)

1/d->0: orthographic projection on z=0

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

1/100000000100001

d

M’persp=

Caz 2

Projective transformation – case 3

Projective transformation – case 3

Projective transformation – case 3

Projective transformation – case 3

Orthographic proj. on x=0: zp=0, Q=infinity, (dx,dy,dz)=(0,0,-1)Cavalier proj on z=0: zp=0, Q=infinity, (dx,dy,dz)=(cos(α),sin(α),-1)Cabinet proj. on z=0: zp=0, Q=infinity, (dx,dy,dz)=(1/2 cos(α),1/2 sin(α),-1)Perspective proj with 1 point: Q is finite, Mgeneral(0,0,1,0)T=(Q dx, Q dy, zp)

Description of visualization system

Projection plane: reference point Pr+ normal nReference viewing system: originie: Pr, 1 axis = n, 2 axis = v (image vertical, ex: y), 3 axis = u obtained from the product u x v = nProjection plane = u Pr vWindow in the projection plane: max/min coordinates in u Pr v + Cf (window center)Pd + projection indicator

Vector product

Example of viewing definition

Pr=(0,0,0) (xyz), n=(0,0,1) (xyz), v=(0,1,0) (xyz), Pd=(0.5,0.5,1) (uvn), Window=(0,1,0,1) (uvn) Projection: parallel

Example 2

Pr=(0,0,54), n=(0,0,1), v=(0,1,0), Pd=(8,6,30), Window (-1,17,-1,17), Projection: perspective

Example 3

Pr=(0,0,0), n=(0,0,1), v=(0,1,0), Pd=(8,8,100), Window=(-1,17,-1,17), Projection=parallel

Examples

Pr=(16,0,54), v=(0,1,0), Window=(-20,20,-5,35)

(a) n=(0,0,1) Pd=(20,25,20), perspective 1 point(b) n=(1,1,1), Pd=(0,0,10), parallel isometric(c) n=(1,0,1), Pd=(0,25,20sqrt(2), persp. 2 points

Vizualisation system

Viewing volume - analogy

Viewing volume

= part of WCS that is projected on the projection plane

1. Perspective projection : part of a pyramid with the peak in the projection center and the edges crossing through the window corner

2. Parallel projection: parallelepipedon with edges parallel with the projection direction

Viewing volumes

Viewing volume

Viewingvolume

Volum de vedere

Volum de vedere

Volum de vedere

Viewing volume

Viewing volumes

Canonical volumes

Canonical volume

Transforming the parallel volume in a canonical one

Transforming the perspective volume in a canonical one

Transforming the canonic volume from perspective proj to the one of parallel proj

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−+−+

0100)1/()1/(100

00100001

minminmin zzz

Can.view vol. persp->par.

3D visualization

Exemplu