projection

102 downloads 722 Views 10MB Size Report
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.
III. Projections

Image physics

Old definition

Definitions „ „ „

3D objects to 2D image Solution Rn to Rm, m plane gemetrical surfaces ? D = distance (viewing point, projection plane) D = infinity: parallel projections D< infinity: perspective projections

Classification (a) (b)

Perspective projection: plan & center of projection 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 measurements Perspective imitates eyes or camera and looks more natural ‰ ‰

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

Further classification

Examples

History

Pespective projection „

„

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

y

x z z

x

Two and three point perspectives y

„

„

„

„

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

y x z

z

x

y

y x z

x z

Perspective Projection

„

Used for: ‰ ‰ ‰

„

Pros: ‰

„

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

Cons: ‰

„

advertising presentation drawings for architecture, industrial design, engineering fine art

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

Different from a parallel projection because ‰ ‰ ‰

parallel lines not parallel to the projection plane converge size of object is diminished with distance foreshortening 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 center Then P’ : x’=(x*z0-z*x0)/(z0-z), y’=(y*z0z*y0)/(z0-z) For the perspective with 2 points: rotate around 1 axis + persp. roj. with 1 point For 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 projections „

Assume object face of interest lies in principal plane, i.e., parallel to xy, yz, or zx planes.

„

DOP = Direction of Projection, VPN = View Plane Normal

„

1) Multiview Orthographic ‰ ‰ ‰

„

2) Axonometric ‰ ‰ ‰

„

VPN || a principal coordinate axis DOP || VPN shows single face, exact measurements VPN || a principal coordinate axis DOP || VPN adjacent faces, none exact, uniformly foreshortened (function of angle between face normal and DOP)

3) Oblique ‰ ‰ ‰

VPN || a principal coordinate axis DOP || VPN adjacent faces, one exact, others uniformly

Multiview Orthographic „

Used for: ‰ ‰

„

Pros: ‰ ‰

„

accurate measurement possible all views are at same scale

Cons: ‰

„

engineering drawings of machines, machine parts working architectural drawings

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 angles Disadvantage: hard to understand Frontal view (projection on xOy plane): ⎛ 1 0 0 0 ⎞ such that x’=x, y’=y, z’=0 ⎜ ⎟ ⎜0 1 0 0⎟ ⎜0 0 0 0⎟ ⎜ ⎟ ⎜0 0 0 1⎟ ⎝ ⎠

Plan – top view „

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

⎛1 ⎜ ⎜0 ⎜0 ⎜ ⎜0 ⎝

0 1 0 0

0 0 0 0

0⎞ ⎛1 0 ⎟⎜ 0⎟ ⎜0 0 0⎟ ⎜ 0 −1 ⎟ ⎜⎜ 1 ⎟⎠ ⎝ 0 0

0 0⎞ ⎟ 1 0⎟ 0 0⎟ ⎟ 0 1 ⎟⎠

Profile – side view „

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

⎛1 ⎜ ⎜0 ⎜0 ⎜ ⎜0 ⎝

0 1 0 0

0 0 0 0

0⎞ ⎛ 1 ⎟⎜ 0⎟ ⎜ 0 0 ⎟ ⎜ −1 ⎟ ⎜⎜ 1 ⎟⎠ ⎝ 0

0 1 0⎞ ⎟ 1 0 0⎟ 0 0 0⎟ ⎟ 0 0 1 ⎟⎠

Plan, elevation, profile „

„

„

„

Front view: plane z=0, projection center at infinity on + halfaxis Back view: plane z=0, projection center at - infinity on - halfaxis Left view: plane x=0, projection center at infinity on + halfaxis Right view: plane x=0, projection center at -infinity on - 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 foreshortened Isometric: Angles between all three principal axes equal (120º). Same scale ratio applies along each axis Dimetric: Angles between two of the principal axes equal; need two scale ratios Trimetric: Angles different between three principal axes; need three scale ratios Note: 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 xOy „ Ex: OrtoxOyRx(u)Ry(v) Isometric projection: v=arcsin(1/sqrt(3)), u=arcsin(1/2) „

Isometric Projection „

Used for: ‰ ‰ ‰ ‰ ‰

„

Pros: ‰ ‰ ‰

„

don’t need multiple views illustrates 3D nature of object measurements can be made to scale along principal axes

Cons: ‰ ‰

„

catalogue illustrations patent office records furniture design structural design 3d Modeling in real time (Maya, AutoCad, etc.)

lack of foreshortening creates distorted appearance more 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 skyscrapers Pros: ‰ can present exact shape of one face of an object (can take accurate measurements): better for elliptical shapes than axonometric projections, better for “mechanical” viewing ‰ lack of perspective foreshortening makes comparison of sizes easier ‰ displays 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)

Mpersp=

⎛1 ⎜ ⎜0 ⎜0 ⎜ ⎜0 ⎝

0 0 1 0 0 1 0 1/ d

0⎞ ⎟ 0⎟ 0⎟ ⎟ 0 ⎟⎠

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)

M’persp=

„

⎛1 ⎜ ⎜0 ⎜0 ⎜ ⎜0 ⎝

0 0 1 0 0 0 0 1/ d

0⎞ ⎟ 0⎟ 0⎟ ⎟ 1 ⎟⎠

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

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 n Reference viewing system: originie: Pr, 1 axis = n, 2 axis = v (image vertical, ex: y), 3 axis = u obtained from the product u x v = n Projection plane = u Pr v Window 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 „

(a) (b) (c)

Pr=(16,0,54), v=(0,1,0), Window=(-20,20,5,35) n=(0,0,1) Pd=(20,25,20), perspective 1 point n=(1,1,1), Pd=(0,0,10), parallel isometric n=(1,0,1), Pd=(0,25,20sqrt(2), persp. 2 points

Vizualisation system

Viewing volume - analogy

Viewing volume „

1.

2.

= part of WCS that is projected on the projection plane Perspective projection : part of a pyramid with the peak in the projection center and the edges crossing through the window corner Parallel projection: parallelepipedon with edges parallel with the projection direction

Viewing volumes

Viewing volume

Viewing volume

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 ⎛1 ⎜ ⎜0 ⎜0 ⎜ ⎜0 ⎝

⎞ ⎟ 1 0 0 ⎟ 0 1 /(1 + z min ) − z min /(1 + z min ) ⎟ ⎟ ⎟ 0 −1 0 ⎠ 0

0

0

Can.view vol. persp->par.

3D visualization

Exemplu