Quiz 2
Quiz 2
Quiz 2
Dashboard / My courses / COSC363-20S1 / Sections / Lab material (incl quizzes) / (Ungraded) Revision Quiz-02: Transformations
Question 1 Which one of the following OpenGL/GLUT functions generates a transformation matrix?
Correct
b. glutSolidCube(...)
c. glLightfv(...)
d. glPolygonMode(...)
e. glFlush()
Correct
Marks for this submission: 1.00/1.00. Accounting for previous tries, this gives 0.00/1.00.
Question 2 The following code applies a simple transformation to a unit cube. The transformed position of the cube is shown in
Correct the figure. What are the transformed coordinates of the point P at the bottom right corner of the cube?
Mark 1.00 out of glTranslatef(2, 1, 1);
1.00 glutSolidCube(1);
Select one:
a. (2.5, 0.5, 1.5)
b. (3, 2, 2)
c. (3, 0, 2)
e. (2, 1, 1)
https://learn.canterbury.ac.nz/mod/quiz/review.php?attempt=2437958&cmid=1422541 1/5
6/10/2020 (Ungraded) Revision Quiz-02: Transformations: Attempt review
Correct
Marks for this submission: 1.00/1.00. Accounting for previous tries, this gives 0.75/1.00.
Question 4 The transformation specified by the function glScalef(2.0, 0.0, −0.5) is applied to a point (3., 5., 8.). The coordinates of
Correct the transformed point are
Mark 1.00 out of
1.00 Select one:
a. (3.2, 5.0, -8.5)
e. (6., 0, −4.)
Question 5
Consider the following code segment:
Correct
glScalef(6, 5, 4);
Mark 1.00 out of
glTranslatef(2, 1, 3);
1.00
glScalef(3, 2, 2);
drawTriangle();
Assume that the function drawTriangle() draws a triangle with one vertex P at the origin, as shown in the figure below.
What are the transformed coordinates of P?
Select one:
a. (30, 15, 20)
b. (0, 0, 0)
c. (12, 5, 12)
d. (2, 1, 3)
Question 6 A rotation specified by the function glRotatef(−90, 0, 1, 0) is applied to a point on the +Z axis. To which axis does the
Correct point move after the rotation?
Mark 1.00 out of
1.00 Select one:
a. -X axis
b. -Y axis
c. +Y axis
d. +X axis
e. -Z axis
Correct
Marks for this submission: 1.00/1.00.
Question 7 Which one of the following code segments specify the transformation of the teapot shown in the following figure?
Correct
Select one:
a.
glRotatef(90, 0, 0, 1);
glutSolidTeapot(1);
b.
glRotatef(90, 1, 0, 0);
glRotatef(90, 0, 1, 0);
glutSolidTeapot(1);
c.
glRotatef(90, 0, 1, 0);
glRotatef(-90, 1, 0, 0);
glutSolidTeapot(1);
d.
glRotatef(-90, 0, 1, 0);
glRotatef(90, 1, 0, 0);
glutSolidTeapot(1);
e.
glRotatef(90, 0, 1, 0);
glRotatef(90, 1, 0, 0);
glutSolidTeapot(1);
https://learn.canterbury.ac.nz/mod/quiz/review.php?attempt=2437958&cmid=1422541 3/5
6/10/2020 (Ungraded) Revision Quiz-02: Transformations: Attempt review
Question 8
Correct
The initial orientation of a teapot at the origin is shown in the figure above. The teapot is transformed using the
following code:
glRotatef(−45.0, 0., 0., 1.);
glTranslatef(0.0, 3.0, 0.0);
glutSolidTeapot(1);
Which figure below shows the correct position and orientation of the transformed teapot?
Select one:
a. Fig. A
b. Fig. B
c. Fig. C
d. Fig. D
e. Fig. E
Correct
Marks for this submission: 1.00/1.00.
https://learn.canterbury.ac.nz/mod/quiz/review.php?attempt=2437958&cmid=1422541 4/5
6/10/2020 (Ungraded) Revision Quiz-02: Transformations: Attempt review
Which statement correctly describes the transformation of the teapot in the above code?
Select one:
a. The teapot is only rotated about the y-axis by 30 degs, and not translated.
b. The teapot is first translated to (2, 1, -3) then rotated about the y-axis by 30 degs.
d. The teapot is first rotated about the y-axis by 30 degs then translated to (2, 1, -3) .
Correct
Marks for this submission: 1.00/1.00.
Question 10 What operation on the transformation stack is performed when the glPushMatrix() function is called?
Correct
e. The stack is cleared and the next transformation matrix is pushed to the stack
Correct
Marks for this submission: 1.00/1.00. Accounting for previous tries, this gives 0.00/1.00.
https://learn.canterbury.ac.nz/mod/quiz/review.php?attempt=2437958&cmid=1422541 5/5