Transcript Chapter 5

z v y v x v

P z

  1 0 0 0   0 1   0 0 0 0 0 0 0 0 0 1     

z v y v x v

P x

  0 0 0 0   0 1 0 0   0 0 0 0 1 0 0 1     

z v y v x v

P y

  1 0 0 0   0 0 0 0   0 0 0 0 1 0 0 1     

Ex.

ก ำหนดให ้วัตถุมีจุดยอดเป็น จงหำด ้ำน Front

X

และ  0 2 2 0   0 0 1 1 2 2 2 2 0 0 0 0 0 2 2 1 1 2 2 0   2 1 2 1 2 2 1 1 0 0 1 1 1 1 0 0 side view 1 1 1 1 1 1 1      y v 7 12 11 4 10 9 12 7 8 6 3 5 x v 1 2 z v

X

  0 2 2 0 2 2 2 2 0 0 0 0     0 2 1 0 2 1 1 1 2 1 1 2 0 2 2 1 1 2 2 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1     

P z X

' 

P z X

  1 0 0 0   0 1 0 0   0 0 0 0 0 0 0 1         0 0 2 0 2 0 1 1   2 1 2 1 2 2 1 1 2 0 2 2 2 1 1 2 1 1 2 0 0 0 1 1 2 2 0 0 0 1 1 1 1 0 0 1 1 1 1 0          0 0 2 0 2 0 1 1   0 1 0 1 0 0 1 1 2 0 2 2 2 1 1 2 1 1 1 2 0 0 0 1 2 2 0 0 0 0 0 0 0 0 0 1 1 1 1 0        1     0 0 0 0 1 0 0 0 0 0 0 0 0 0 1     

z v

X

'     0 0 2 0 2 0 1 1   0 0 0 0  1 1 1 1 2 0 2 2 2 1 1 2 1 1 1 2 0 0 0 1 2 2 0 0 0 0 0 0 0 0 0 1 1 1 0    1    y v 7 12 10 11 6 7 4 9 3 8 1 12 2 5 x v Only one face of an object

  These two planes are called the near far clipping planes, or the front-back clipping planes.

The near and far planes allow us to exclude objects that are in front of or behind the part of the scene that we want to display.

The orthogonal-projection view volume

Axonometric Orthogonal Projection    We can also form orthogonal projections that display more than one face of an object.

Such views are called axonometric orthogonal projections.

The most commonly used axonometric projection is the isometric projection, which is generated by aligning the projection plane (or the object) so that the plane intersects each coordinate axis in which the object is defined, called the principal axes.

z

Isometric Projection

y y z x x

Isometric Projection

   1) Rotation about the y-axis 2) Rotation about the x-axis 3) An orthogonal projection to the z=0 plane

M TILT

  2) [

T R

] 

x

1) [

T R

] 

y

       1 0 0 cos 0 sin 0 0 0 0  

x x

sin cos 0  

x x

1 0 0              cos  0 

y

0 0 1 sin 

y

0 0 sin 0 0 cos 0  

y y

0 1 0                sin cos sin  

y y

 sin

y

0  cos

x

x

cos 0 0 sin sin

θ

x y

sin co

s

   0

y y x

cos cos  

x y

0 0 1 0       

3)Pz

M ISO

        1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1     

M TILT

     1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1             sin cos sin  

y y

 sin

y

0  cos

x

x

0 cos sin 

θ y x

sin sin co

s

0   0

x y

y

0 cos cos  

y x

0 1 0           cos   sin 0 0  

y y

sin 

x

0 cos 

x

0 sin sin 0  0

x

y

cos 

y

0 0 0 1 0      

Ex.

ก ำหนดให ้วัตถุมีจุดยอดเป็น จงหำ

X

     isometric projection 0 0 2 1 2 0 2 1 2 1 1 1 0 1 2 2 0 2 0 2 1 1 2 2 2 0 0 7 2 1 1 1 1 1 1 1 1 2 0 0 2 1 0 1 1 0 0 1 0       12 y v 4 10 9 11 12 7 8 6 

y

x

 45   35 .

26  3 5 x v 1 2 z v

P

*         cos sin 0 0  

y y

sin 

x

0 cos sin 

x

0 0 sin  0 0

x

y

cos 

y

1 0 0 0              1 0 0 2 2 0 2 1 1 1 2 2 2 1 0 1 2 0 0 2 2 0 2 2 1 2 1 1 1 1 1 1 0 1 1 0 1 2 0 2 0 0 1 1 1 1 0 0              0.707

0.408

0 0 0.816

0 0 0 0.707

0 0.408

0 0 1 0 0             1 0 0 2 2 0 2 1 1 1 2 2 2 1 0 1 2 0 0 2 2 0 2 2 1 2 1 1 1 1 1 1 0 1 1 0 2 1 0 2 0 0 1 1 1 1 0 0              1.414

2.8280

0.816

0.0

1 0.0

0.0

0.0

0.0

1 2.8280

1.4140

0.8160

1 0.0

1 1.4140

0.8160

1 1.4140

2.4480

2.1210

2.1220

0.0

0.0

1 2.0400

1 1.2240

0.0

0.0

0.7070

0.7070

0.0

0.0

0.4080

1.2240

1.6320

0.0

1 0.0

0.0

1 1 0.0

1 0.0

1.0

     

z v 11 y v 9 10 12 4 6 7 5 8 3 2 1 x v

7-7 Oblique Parallel Projections

  In general, a parallel-projection view of a scene is obtained by transferring object descriptions to the view plane along projection paths that can be in any selected direction relative to the view-plane normal vector.

When the projection path is not perpendicular to the view plane, this mapping is called an oblique parallel projection.

Cavalier projection of the unit cube onto the z=0 plane Cabinet Projection [Foley et al.]

P S P ’ L R

  1) Shearing of the object in space in a direction parallel to the plane of projection 2) Orthogonal projection onto the plane of projection

2) Projection Pz 1) Shearing

M OB

       1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1           1 0 0 0 1 0 0 0 Lcos L 1 0 sin   0 0 0 1       1     0 0 0 1 0 0 0 Lcos L sin 0 0   0 0 1 0     

R(2,0,5) และ S(4,0,3) โปรเจ็คชัน แบบ Oblique (Cavalier) ลงบน ระนาบ Z=0 โดยมุมแอลฟา = 45 องศา, L=1 y v P

X

  3   4 1 0 2 4 0 0   0 1 4 1 5 3 1 1      Q R S x v z v

X

'        1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1           1 0 0 0 1 0 0 0 Lcos L 1 0 sin   0 0 0 1           3 4 0 0 0 0 1 1 4 1 2 5 4 3 1 1           1 0 0 0 1 0 Lcos L 0 0 sin 0 0   0 0 0 1           3 4 0 0 0 0 1 1 4 1 2 4 5 3 1 1        1     0 0 0 1 0 0.707

0 0.707

0 0 0 0 0 0 1           3 4 0 0 0 0 1 1 4 1 2 4 5 3 1 1            3 4 0 1 3.83

2.82

0 1 5.54

3.54

0 6.12

2.12

0 1 1     

7-8 Perspective Projections

 We can approximate this geometric optics effect by projecting objects to the view plane along converging paths to a position called the projection reference point (or center of projection).

Perspective projection

y z-axis vanishing point x z

One-Point Perspective Projection

[Foley et al.] fig 6.3 One-point perspective projections of a cube onto a plane cutting the z axis showing vanishing point of lines perpendicular to projection plane

2-Point Perspective Projections

   1) Rotate object with an angle about y axis 2) Translate object by [0 m n] 3) Perform 1-point perspective projection onto the xy-plane (z=0)

 Rotate object with an angle about y-axis [

T R

] 

y

        cos  sin 0 

y

0 0 1 

y

0 0 sin cos 0 0 

y

0 0 

y

1 0       

 Translate object by [0 m n] [

T TR

] ( 0 ,

m

,

n

)        1 0 0 0 0 1 0 0 0 0 0 0 1 m n 1      

 1-Point Perspective projection onto Z=0 [

M PERS

]   1 0 0 0    0 1 0 0       0 0 0 0 0 0 1 Zcp 1    

z Ex. ลูกบาศก ์ถูกกระท าแบบ 2-point perspective projection โดยการ หมุนรอบแกน y ไปเป็นมุม 30 องศา แล้วเลื่อนไปด้วยระยะ (0,3,-3) และ Zcp center of projection คือ (0,0,2) 4 6 5 1 3 8 2 7

X

 x  0 1 1 0 0 0 1 1    0 0 1 1   0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1    

X

'   0 0.315

0.315

0 2.242

2.242

0.59

0.59

    1.2

0  1 1.1

0 1 1.455

1.6

1 0 0 1 1.935

1.451

1.295

1.727

1 0 1 0 1 0 1 0 y       x z

3-Point Perspective Projections

    1) Rotate object with an angle about y axis 2) Rotate object with an angle about x axis 3) Translate object by [0 m n] 4) Perform 1-point perspective projection onto the xy-plane (z=0)