Topic 6: 3D Transformations
- Homogeneous 3D transformations
- Scene Hierarchies
- Change of basis and rotations in 3D
Topic 6: 3D Transformations Homogeneous 3D transformations Scene - - PowerPoint PPT Presentation
Topic 6: 3D Transformations Homogeneous 3D transformations Scene Hierarchies Change of basis and rotations in 3D Showtime: Logitics Assignment 1 Due Tomorrow Assignment 2 available today/tomorrow For assignment
Translate a point [x y]T by [tx ty]T : x’ = 1 0 tx x y’ 0 1 ty y 1 0 0 1 1 Rotate a point [x y]T by an angle t : x’ = cost -sint 0 x y’ sint cost 0 y 1 0 0 1 1 Scale a point [x y]T by a factor [sx sy]T x’ = sx 0 0 x y’ 0 sy 0 y 1 0 0 1 1
Translate a point [x y z]T by [tx tytz]T : x’ = 1 0 0 tx x y’ 0 1 0 ty y z’ 0 0 1 tz z 1 0 0 0 1 1 Rotate a point [x y z]T by an angle t around z axis: x’ = cost -sint 0 0 x y’ sint cost 0 0 y z’ 0 0 1 0 z 1 0 0 0 1 1 Scale a point [x y z]T by a factor [sx sysz]T x’ = sx 0 0 0 x y’ 0 sy 0 0 y z’ 0 0 sz 0 z 1 0 0 0 1 1
x z y p a b c
modeling transform viewing transform projection transform cartesianize
perspective divide
viewport transform
world camera cannonical view vol. 4D screen cannonical 2D
Ideal pinhole camera Real pinhole camera
pinhole image virtual image
aperture image
Real pinhole camera Camera with a lens
aperture image
aperture
Camera with a lens Depth of Field
aperture
W u v
modeling transform viewing transform projection transform cartesianize
perspective divide
viewport transform
world camera cannonical view vol. 4D screen cannonical 2D
Peye Pref Vup
W u v
Peye Pref Vup w=(Peye-Pref)/||Peye-Pref||
W u v
Peye Pref Vup w u=(Vupxw)/|| Vupxw ||
Peye Pref Vup w u v=wxu
Peye Pref Vup w u v=wxu
Peye Pref Vup w u v=wxu
modeling transform viewing transform projection transform cartesianize
perspective divide
viewport transform
world camera canonical view vol. 4D screen canonical 2D
What is the difference between these images?
What is the difference between these images?
Orthographic Perspective
p’=[x y 1]T p=[x y z 1]T
p’=[x y 1]T p=[x y z 1]T q q’ Is |p-q| = |p’-q’| ? If m= (p+q)/2, Is m’ = (p’+q’)/2? m’ m
Perspective Projection
w u v
w u v d P P’
w u v d P P’
y z
P(x,y,z) P’(x’,y’,z’) Image plane (0,0,d)
Homogenous Coordinate after Orthographic Projection Homogenous Coordinate after Perspective Projection
Projected image
Map 3D to a cube centered at the origin of side length 2! p’ p x y z l r t b n f
View Plane View Plane Camera Space Warped to look like Orthographic Projection
modeling transform viewing transform projection transform cartesianize
perspective divide
viewport transform
world camera canonical view vol. 4D screen canonical 2D
modeling transform viewing transform projection transform cartesianize
perspective divide
viewport transform
world camera canonical view vol. 4D screen canonical 2D