CG Class 9, Thurs 2019-09-19
Table of contents
1 Today's iclicker questions
-
What does this line do:
gl.bindBuffer( gl.ARRAY_BUFFER, vBuffer );
- Create this buffer.
- Enable this buffer so that the shaders will use it.
- Get the address of variable vBuffer.
- Prevent this buffer from being modified.
- Specify that this buffer will be the object of future buffer operations.
-
What does this line do:
var vBuffer = gl.createBuffer();
- Create this buffer.
- Enable this buffer so that the shaders will use it.
- Get the address of variable vBuffer.
- Prevent this buffer from being modified.
- Specify that this buffer will be the object of future buffer operations.
-
How does gl.drawArrays know when the vertices it's drawing in 3D?
- It's specified as one of the arguments in gl.drawArrays.
- It's specified as one of the arguments in gl.bufferData.
- It's specified as one of the arguments in gl.vertexAttribPointer.
- It's specified as one of the arguments in gl.getAttribLocation.
- It's specified as one of the arguments in gl.enableVertexAttribArray.
-
How does gl.drawArrays know when the color values are floats instead of ints?
- It's specified as one of the arguments in gl.drawArrays.
- It's specified as one of the arguments in gl.bufferData.
- It's specified as one of the arguments in gl.vertexAttribPointer.
- It's specified as one of the arguments in gl.getAttribLocation.
- It's specified as one of the arguments in gl.enableVertexAttribArray.
-
How does gl.drawArrays know how many triangles are in a triangle strip?
- It's specified as one of the arguments in gl.drawArrays.
- It's specified as one of the arguments in gl.bufferData.
- It's specified as one of the arguments in gl.vertexAttribPointer.
- It's specified as one of the arguments in gl.getAttribLocation.
- It's specified as one of the arguments in gl.enableVertexAttribArray.
-
Normalize this vector: (8,-6,0).
- (3, 4, 5).
- (3/5, -4/5, 0).
- (4/5, -3/5, 0).
- (4/5, 3/5, 0).
- (8, -6, 10).
-
Find a normal vector to the plane through the points (1,0,0), (1,1,0), (1,0,1).
- (0, -1, 0)
- (0, 1, 0)
- (1, 0, 0)
- (1, 1, 0)
- (3, 2, 2)
-
Which of these curved surface equation types makes it easy to generate points on the surface?
- explicit
- explicit and implicit
- explicit and parametric
- implicit
- parametric
-
Which of these curved surface equation types makes it easy to test whether a point is on the surface?
- explicit
- explicit and implicit
- explicit and parametric
- implicit
- parametric
-
What type of equation is this: \(x^2+y^2+z^2=1\)
- explicit
- explicit and implicit
- explicit and parametric
- implicit
- parametric
2 Homogeneous coordinates
My take on homogeneous coordinates. IMNSHO (In My Not So Humble Opinion) it's better than the book.
3 Textbook slides: Chapter 5
The big topic for Chapter 5 is homogeneous coordinates. They allow all the common transformations - translation, rotation, scaling, projection - to be expressed as a multiplication by a 4x4 matrix.
- 5_1 Representation - I'll do this really quickly.
4 Textbook programs
-
Chapter 4:
- color interpolation
- element arrays
- etc
We'll skip quaternions until we see 3D rotations.
5 SIGGRAPH 2017 videos
SIGGRAPH is the world's leading CG conference. I'll show various videos from it.