The View Frustum and the Camera Lecture 19
- Slides: 19
The View Frustum and the Camera Lecture 19 Fri, Oct 10, 2003
The View Frustum The view frustum is in the shape of a truncated pyramid, with its vertex at the eye, or camera. The frustum is defined by six planes. n n n left and right (x direction) top and bottom (y direction) near and far (z direction)
The View Frustum left right
The View Frustum top bottom
The View Frustum near far
The Perspective Function The view frustum is defined by the function glu. Perspective(). glu. Perspective(view. Angle, aspect. Ratio, near, far). Example: glu. Perspective(45, 4. /3. , 0. 1, 100. 0);
The Projection Matrix The Perspective function creates the projection matrix, which is used to project the 3 D scene onto a 2 D plane. We will discuss the projection matrix in more detail later.
The Graphics Pipeline Model Matrix Object Coordinates View Matrix World Coordinates Projection Matrix Camera (Eye) Coordinates Viewport Matrix Device Coordinates Window Coordinates
The Camera The camera determines the position, direction, and orientation of the view frustum in world coordinates. camera view frustum
The Camera The function glu. Look. At() positions the camera. glu. Look. At(eye. x, eye. y, eye. z, look. x, look. y, look. z, up. x, up. y, up. z). The camera is positioned at “eye”. The camera is pointed towards “look”. The camera is oriented in the direction “up”.
Fixed Camera We may place the camera in a fixed position. For example, place the camera at 5 on the z-axis, looking at the origin. glu. Look. At(0. 0, 5. 0, 0. 0, 1. 0, 0. 0);
Movable Camera We may create a movable camera by making eye, look, and up variable. Normally up is fixed at (0, 1, 0). Often we fix look at (0, 0, 0). We may vary eye in rectangular or spherical coordinates.
Rectangular Coordinates We may use the x, y, and z keys to vary the x, y, and z coordinates of the camera. ‘X’, ‘x’: increment or decrement x. ‘Y’, ‘y’: increment or decrement y. ‘Z’, ‘z’: increment or decrement z.
Spherical Coordinates We call these distance, pitch, and yaw. Pitch and yaw are angles. The “roll” is normally fixed at 0 from the vertical. Measure pitch in the vertical plane. Measure yaw in the horizontal plane.
Spherical Coordinates yaw
Spherical Coordinates pitch
Spherical Coordinates eye. x = dist cos(pitch) sin(yaw). eye. y = dist sin(pitch). eye. z = dist cos(pitch) cos(yaw).
Spherical Coordinates We may use the keyboard to vary the distance, pitch, and yaw coordinates of the camera. ‘+’, ‘–’: increment or decrement distance. , : increment or decrement pitch. , : increment or decrement yaw.
Example: Viewing the Cone Camera. Mover. cpp n mesh. cpp Look. Mover. cpp
- Camera z
- Frustum volume
- Cylinder has how many faces edges and vertices
- Development of lateral surfaces
- Frustum formula
- Multi camera production examples
- Single camera vs multi camera
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Worms eye view camera shot
- Parts of a camera
- Set view target with blend camera component
- Simple view and complex view
- Simple view and complex view
- Simple view and complex view
- Partial view
- Cycle view and push pull view
- Components of operating systems
- Separatist view and integration view
- Engineering graphics isometric projection
- The orthographic view drawn directly above the front view