# CS 447/547: Computer Graphics Homework 5 solved

\$35.00

## Description

5/5 - (1 vote)

Question 1: A student is planning a polygon mesh data structure in which vertices are stored in a
vertex array, and then the triangular faces in the mesh each store the indices of the vertices and
the triangle’s face plane normal vector. The face data structure is given below.
class Triangle {
int vertices[3]; // The vertex indices.
float nx, ny, nz; // The face-plane normal.
};
a. Is this a convenient way to represent a mesh if used with flat shading? Explain your
reasoning. (2 points)
b. Suggest an object for which this is a good mesh format when used with Gouraud shading.
Explain. (2 points)
c. Suggest an object for which this is a bad mesh format when used with Gouraud shading?
Explain. (2 points)
Question 2: The following figure on the left shows the octahedron used as the starting shape for
sphere subdivision. On the right are the vertex locations.
Perform sphere subdivision of the face 3-4-5 (the one using vertices 3, 4 and 5). Give the location
of the new vertices by splitting edge 3-4, 4-5, and 3-5. (3 points)
Question 3: A Bezier curve will be used to represent a straight line of length 1. The first control
point, x0, is at (0,0,0).
a. The line is to point along the y-axis. Where should the final control point, x3, be located?
(1 point)
b. Say we want the magnitude of the parametric derivative of the curve to equal 1 at both
the start and end of the curve. Where should we place the other two control points, x1 and
x2? (2 points)
c. Show that the magnitude of the parametric derivative is always 1 for the curve you have
created. (2 points)
Question 4: The figure below shows two pieces of circular arcs, joined at the point indicated by
the small horizontal bar. The center of each circle is also marked, and the centers lie on a straight
line through the join point.
a. Each arc is uniformly parameterized such that t = 0 is at the left-most point on the arc, t
= 0.5 is at the midpoint of each arc, and t = 1 is at the right-most point. Do the arcs join
with C1 continuity? (1 point)
b. Do the arcs join with G1 continuity? (1 point)
Question 5: Which of the following must not be cubic Bezier curves, and why not? (4 points)