Geometric Projections PLANAR

PARALLEL

PERSPECTIVE



1−pt OBLIQUE



2−pt

3−pt

ORTHOGRAPHIC

MULTI−VIEW

AXONOMETRIC

ISOMETRIC

DIMETRIC 

TRIMETRIC

 Parallel Projection: projectors are parallel to each other.  Perspective Projection: projectors converge to a point.

ITCS 4120/5120

1

Geometric Projections

ITCS 4120/5120

◦ Projectors converge to a point, the center of projection 3

Geometric Projections

Parallel Projection

Perspective Projection

ITCS 4120/5120

2

◦ Projectors are parallel meeting at infinity Geometric Projections

ITCS 4120/5120

4

Geometric Projections

Orthographic Projection

Multi-View Orthographic Projection ◦ projectors are also aligned with principal axes, common in architectural drawings (Top, Side and Front Views) TOP VIEW

FRONT VIEW

SIDE VIEW

◦ Projectors are orthogonal to the projection plane ITCS 4120/5120

5

Geometric Projections

ITCS 4120/5120

6

Geometric Projections

Isometric Projections Axonometric Projections  View plane Normal not aligned with principal axes.  Useful in revealing 3D nature of objects, but does not preserve shape.

 Classified into Isometric, Dimetric, Trimetric projections  Isometric projections are the most common.

◦ View Plane Normal makes equal angles with all principal axes. ITCS 4120/5120

7

Geometric Projections

ITCS 4120/5120

8

Geometric Projections

Oblique Projections Oblique Projections Combines the advantages of orthographic and axonometric projections.

 Viewpoint is off the VPN axis.  Line joining the viewpoint to the projection point is at an angle α.  projectors are still orthogonal to the viewplane.  Special Cases: ⇒ Cabinet: tanα = 1.0 ⇒ Cavalier tanα = 0.5

ITCS 4120/5120

9

Geometric Projections

ITCS 4120/5120

Perspective Projections

10

Geometric Projections

Perspective Projections: 1-Point Perspective

 Classifed as 1-Point, 2-Point and 3-Point Perspective 

VP

H

G C

D

F

E

A

B

Vanishing Point ⇒ Lines and faces recede from a view and converge to a point, known as a vanishing point.

⇒ Parallel edges converge at infinity, eg. AD, BC . ITCS 4120/5120

11

Geometric Projections

ITCS 4120/5120

12

Geometric Projections

Perspective Projections: 1-Point Perspective

Perspective Projections: 1-Point Perspective

ITCS 4120/5120

13

Geometric Projections

Perspective Projections: 1-Point Perspective

ITCS 4120/5120

14

Geometric Projections

Perspective Projections: 2, 3 point Perspective 

Y

VP1

VP 2 



Y

VP 1 

X

VP 2 



Z 

X

VP3



Z

ITCS 4120/5120

15

Geometric Projections

ITCS 4120/5120



16

Geometric Projections

ITCS 4120/5120

17

Geometric Projections

ITCS 4120/5120

18

Geometric Projections

Geometric Projections

ITCS 4120/5120

20

Geometric Projections

Perspective Projections: 2-Point Perspective

ITCS 4120/5120

19

ITCS 4120/5120

21

Geometric Projections

ITCS 4120/5120

22

Geometric Projections

Geometry of Perspective Projection

P’ Eye( eu, ev, en) P(pu, pv, pn) Projection Plane

Problem: ~ 0, the projection of the P~ (pu, pv , pn), To determine P a point on the object, given the view point E(eu , ev , en ), ~ , the view plane normal (VPN). and N Simplification: ⇒ The View Plane contains the origin. ITCS 4120/5120

23

Geometric Projections

ITCS 4120/5120

24

Geometric Projections

Geometry of Perspective Projection

Geometry of Perspective Projection

P(pu, pv, pn) t=1 P’

~ is on the N ~ axis. Simplification: E

t=0 Eye(eu, ev, en)

N

n=0 Projection Plane

~ = (eu, ev , en) = (0, 0, en) E So   en pv pu , P 0 = eenn−p n en −pn

pn(t) = en + t(pn − en) pn(t0) = en + t0(pn − en) = 0 Hence t0 =

=

en en −pn

Projection Point: Pu0 (t0) = eu + t0(pu − eu) n (pu − eu) = = eu + ene−p n Similarly, −ev pn Pv0 (t0) = enepnv −p n ITCS 4120/5120



pu , pv 1−pn /en 1−pn /en



Thus P 0 projects to the 2D point en pu −eu pn en −pn

(p0u, p0v ) =

25

Geometric Projections



pu , pv 1−pn /en 1−pn /en



ITCS 4120/5120

26

Perspective Projection Destroys Depth Information!

Geometric Projections

Pseudo Depth

P2(x2, y2, z2) P2(x1, y1, z1)

“Need to retain depth information after projection for use in shading and visible surface calculations.”

P’

Define pn 0 =

Eye (eu, ev, en) Projection Plane

~0 All points on the projector project to the same point P Assume ~a to be any point on the projector.

pu (eu = ev 1−pn /en eu +t(au −eu ) 1−(en +t(an −en ))/en au 1−an /en

= = Similarly,

Pv0 (t) =

ITCS 4120/5120

av 1−an /en

as a measure of P ’s depth.

As pn increases, pn 0 increases. Hence

P (t) = ~e + t(~a − ~e) Pu0 (t) =

pn , 1−pn /en

(pu0, pv 0, pn0) =

= 0)



pu , pv , pn 1−pn /en 1−pn /en 1−pn /en



In Homogeneous coordinates,

P 0 = (pu, pv , pn, 1 − pn/en)   ~ p pu pv pn 1 T =M

27

Geometric Projections

ITCS 4120/5120

28

Geometric Projections

Perspective Projection: General Case Perspective Projection  1 0 Mp =  0 0

0 0 1 0 0 1 0 −1/en

~ is off the N ~ axis If E P 0 = MpMsP~

 0 0 0 1

and,

 1 0 Ms =  0 0

which is the perspective projection transform.

0 −eu/en 1 −ev /en 0 1 0 0

 0 0 0 1

~ off the N ~ axis introduces a shear, given by Ms ⇒ Moving E ITCS 4120/5120

29

Geometric Projections

ITCS 4120/5120

30

Geometric Projections

View Volume View Space Operations Back Face Elimination Compare the orientation of the polygon with the view point (or center of projection). Define

~ p = polygon normal N ~ = vector to view point N

hzv d hzv yv = ± d

xv = ±

~p • N ~ >0 visibility = N Note

Clipping is more efficiently carried out in screen coordinates. ITCS 4120/5120

31

Geometric Projections

ITCS 4120/5120

32

Geometric Projections

Perspective Transformation

3D Screen Space Perspective Projection

yv

P(xv, yv, zv) zv

(xs,ys) xv

yv

d

xs = dxv /zv , ys = dyv /zv

zv xv

In homogeneous coordinates,

dxv hzv dyv ys = hzv f (1 − d/zv ) zs = f −d

X = xv , Y = yv , Z = zv , w = zv /d

Mpersp

 1 0 =  0 0

ITCS 4120/5120

0 0 1 0 0 1 0 1/d

xs =

 0 0 0 0

33

Geometric Projections

ITCS 4120/5120

In homogeneous coordinates,

and

Mpersp

ITCS 4120/5120

f zv df − , w = zv f −d f −d

  d/h 0 0 0 0 0  0 d/h  = 0 0 f /(f − d) −df /(f − d) 0 0 1 0

35

Geometric Projections

Perspective Transformation

Perspective Transformation

X = (d/h)xv , Y = (d/h)yv , Z =

34

Mpersp

   1 0 0 0 d/h 0 0 0 0 0   0 d/h 0 0 0 1 =  0 1 0 0 0 f /(f − d) −df /(f − d)  0 0 0 0 1 0 0 1 0 = Mpersp2Mpersp1

Note: ⇒ Mpersp1 converts a truncated pyramid to a regular pyramid (unit slopes for the side planes)

⇒ Mpersp2 maps the regular pyramid into a box.

Geometric Projections

ITCS 4120/5120

36

Geometric Projections

Perspective Transformation PHIGS Viewing System  A View Reference Coordinate (VRC) system.  View Reference Point (VRP) - origin of VRC  Projection Reference Point (PRP) - center of projection  Allows oblique projections (center of proj. to center of view plane is not parallel to View Plane Normal (VPN)

Consider the following points:

 Near, Far clipping planes and projection plane defined.

⇒ (0, h, d, 1) −→ (0, d, d, 1) −→ (0, d, 0, d)

 Projection window of any aspect ratio and located anywhere in the view plane.

⇒ (0, −h, d, 1) −→ ?? ⇒ (0, f h/d, f, 1)?? ⇒ (0, −f h/d, f, 1) −→ ?? ITCS 4120/5120

37

Geometric Projections

ITCS 4120/5120

View Orientation

38

View Mapping

 VRP - point in World coords.

 Projection type (parallel or perspective)

 VPN - vector in World coords.

 PRP - point in VRC space

 View Up (VUV) - vector in world coords.

 View plane distance - in VRC space  Front and Back plane distances

~ = VU ~V ×VP ~N U ~N × U ~ V~ = V P

ITCS 4120/5120

39

Geometric Projections

 View plane window size (4 limits)  Projection viewport limits in normalized projection space (4 limits)

Geometric Projections

ITCS 4120/5120

40

Geometric Projections

Normalizing Transformation Shear Projection Window Center

 Translate PRP to the origin. After translation,

Shear the center of the projection window such that the center line becomes the zv axis.

 View plane distance = d

 1 0 Msh =  0 0

 Near plane distance = n  Far plane distance = f  Window parameters, ⇒ umax, umin become xmax, xmin ⇒ vmax, vmin become ymax, ymin

ITCS 4120/5120

41

Geometric Projections

ITCS 4120/5120

Scale into symmetric (unit slope) view volume   Ms =  

ITCS 4120/5120

2d xmax −xmin

0 0 0

0

2d ymax −ymin

0 0

43

0 0 1 0

xmax +xmin 2d ymax +ymin 2d

1 0

 0 0  0 1

42

Geometric Projections

Perspective Transformation

 0 0  0 1

 1 0 Mpersp =  0 0

Geometric Projections

0 1 0 0

ITCS 4120/5120

 0 0 0 1 0 0  0 f /(f − n) −f n/(f − n) 0 1 1

44

Geometric Projections

(1, 1)

=

N

Clipping in 3D or N U=

Normalizing Transformation - Properties

V

U or V

U or V

N

N

 Planes are preserved.

n min U=

F

 Planes parallel to the view plane are shifted.  The 4 sidewalls of the view volume become 4 faces of a paral-

−N

B

View Plane

or

V=

−N

Clipping Space

View Space

Clip boundaries are as follows:

lelepiped, view point is at infinity.

 Also known as pre-warping.

−gn ≤ gu ≤ gn −gn ≤ gv ≤ gn nmin ≤ gn ≤ 1

 Useful for visible surface calculations.

Use the Cohen-Sutherland Algorithm with these boundaries defining the clip volume. ITCS 4120/5120

45

Geometric Projections

ITCS 4120/5120

46

Geometric Projections

3-D Clipping in Homogeneous Coordinates Cohen-Sutherland Clipping Algorithm

Y

P(x, y, z)

U

 Extension of the 2D algorithm to 3D.

Q(a,b,c)

 Note that the scaling to unit slope planes facilitates efficient clipping

Z

in 3D.

(rx, ry, rz) V

⇒ gu > −gn - Point to right of volume

Camera Coords

World Coords

⇒ gu < gn - Point to left of volume

X

⇒ gv > −gn - Point above volume

−1 ≤

⇒ gv < gn - Point below volume

gu gv gn ≤ 1, −1 ≤ ≤ 1, 0 ≤ ≤1 gw gw gw OR

⇒ gn < nmin - Point in front of volume ⇒ gn > 1 - Point behind volume

ITCS 4120/5120

N (0, 0, 0)

−gw ≤ gu ≤ gw , −gw ≤ gv ≤ gw , 0 ≤ gn ≤ gw 47

Geometric Projections

ITCS 4120/5120

Equalities reverse if gw ≤ 0.0 48

Geometric Projections

Clipping Points and Lines

Clipping Points and Lines

W P1

W= U or W = V

W= −U or W = −V W W= −U or W = −V

P1’

W= U or W = V P1

W=1 Projection of P1,P1’

P2’

W=1

P2’

U or V

U or V

P2

 P 1 and P 2 are on opposite side of W = 0 plane.

P1’

 If gw component is negative, multiply through by -1, then clip.  Same procedure when both endpoints of a line have negative gw  When endpoints of a line have opposite gw , what do we do?? ITCS 4120/5120

49

Geometric Projections

 The projection of P1P2 has 2 parts; one segment extends to −∞, the other to +∞.  Solution: Clip twice, once with each region.  Better, Clip with top region, negate end points, and clip again with top region - Need to have only 1 clip region.

ITCS 4120/5120

50

Geometric Projections