Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions