Procuring digital preservation CAN be quick and painless with our new dynamic...
Building a camera in a program | Computer Graphics
1. Building camera in a
program
Aravindhan A
Final year CSE | SMIT
about.me/aravindhan
2. Why build camera?
To have finite control over camera movements,
we create and manipulate our own camera in a
program
Created through a camera class which can do
all functions
7. Position the camera
By default, camera is at origin, looking in –z dir
To “move the camera”, set up a modelview matrix that moves
objects that are drawn
Ignore Z-coordinate when drawing
8. LookAt function
Most 3D toolkits let you position the camera by setting
eyepoint, lookpoint, and up direction
lookAt(Xeye, Yeye, Zeye, Xat, Yat, Zat,
Xup, Yup, Zup):
Effect: set the
modelview
matrix