Question: Given is a cube in the range [0 , 1] 3 . One looks through glm::lookAt(0.5, 0.5, 3.0, 0.5, 0.5, 1.0, 0.0, 1.0, 0.0) to

Given is a cube in the range [0 , 1]3 . One looks through glm::lookAt(0.5, 0.5, 3.0, 0.5, 0.5, 1.0, 0.0, 1.0, 0.0) to the center of the front face (z = 1).

a) Determine the parameters of a perspective projection with glm::frustum(...), so that the cube is half the size of the window (half the width and half the height) and centered in the middle of the window. Set near = 1 and f ar = 4. Sketch the view pyramid from above.

b) What are the coordinates of the cube vertices [ 1 1 0 1 ]T and [1 1 1 1] T in the camera coordinate system and in the canonical volume (cube from -1 to +1)? Sketch the cube in the canonical volume from above. (Note: The conversion into the canonical volume is done with the glm::frustum matrix, the coordinates of the remaining cube vertices can be determined by symmetries).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!