Interactive program to adjust near and far clipping planes:
http://www.songho.ca/opengl/files/matrixModelView.zip
Note: This program will only run under Microsoft’s Windows operating system. It uses a combination of OpenGL as well as Windows API. However, you can still read the code.
The "take away" from reading the code: Linear transformations are used to adjust camera view when near or far clipping planes are adjusted. This is how we compute the view from the camera!
The arrow is pointing to the camera's perspective in the screenshot image below.
The arrow is pointing to the far clipping plane in the screenshot image below.
The arrow is pointing to the near clipping plane in the screenshot image below.
The arrow is pointing to the near camera in the screenshot image below.
The arrow is pointing to a control panel to adjust the camera's position (X,Y,Z) in the screenshot image below.
The arrow is pointing to a control panel to adjust the camera's rotation (yaw, pitch, roll) in the screenshot image below.
The arrow is pointing to a control panel to adjust the teapot's position (X,Y,Z) in the screenshot image below.
The arrow is pointing to a control panel to adjust the teapot's rotation (yaw, pitch, roll) in the screenshot image below.
The arrow is pointing to the actual OpenGL commands (i.e. what you would use in an OpenGL program) to adjust the camera's position (X,Y,Z) and rotation (yaw, pitch, roll) in the screenshot image below.
The arrow is pointing to the actual OpenGL commands (i.e. what you would use in an OpenGL program) to adjust the teapot's position (X,Y,Z) and rotation (yaw, pitch, roll) in the screenshot image below.
The arrow is pointing to the Model matrix's values that OpenGL uses to create the perspective view you see on the screen.
Computer Graphics with OpenGL (4th Edition) by Donald Hearn, M. Pauline Baker, and Warren R. Carithers (pp. 307- 357).
Fall 2016, CS-116A:
Lectures:
Assignments:
Handouts:
Programs: