Time for action – exploring translations: world space versus camera space
Open
ch4_ModelView_Translation.html
in your HTML5 browser:We are looking from a distance at the positive z-axis at a cone located at the origin of the world. There are three sliders that will allow you to translate either the world or the camera on the x, y, and z axis, respectively. The world space is activated by default.
Can you tell by looking at the World-View matrix on the screen where the origin of the world is? Is it [0,0,0]? (Hint: check where we define translations in the Model-View matrix).
We can think of the canvas as the image that our camera sees. If the world center is at [0,-2,-50], where is the camera?
If we want to see the cone closer, we would have to move the center of the world towards the camera. We know that the camera is far on the positive z-axis of the world, so the translation will occur on the z-axis. Given that you are on world coordinates, do we need to increase or decrease the z-axis slider...