viewing transformation
View transformation:
think about how to take a photo?
- Finda good place arrange people(model transformation)
- Find a good "angle" to put the camera(view transformation)
- Cheese(projection transformation)
how to perform view transformation?
- define the camera
- camera position
- gaize direction
- up direction
- key observation
- If the camera and objects move together,the picture will be the same
- how to transform the camera?
- the origin,up at Y,look at -Z
- transform the object along with the camera
- transform the camera by
- 即先进行平移再旋转
对于矩阵直接写出来较为困难,but它的逆矩阵容易写出来即
对于旋转矩阵来讲它的逆=它的转置
Summary:
- transform objects together with the camera
- Until camera's at origin up at Y,look at -Z
Projection transformation:
Orthographic Projection:
A simple way of understanding:
- Drop the Z coordinate
- Translate and scale the resulting rectangle to
Perspective Projection:
- Most common in Computer Graphics
- Further objects are smaller
- Parallel lines not parallel, converge to a point
How to do perspective projection?
- “squish to a cuboid ”
- Do orthographic projection