CSCI 480/580 Lecture 5 - In-Class Problems

  1. Consider a point \(\mathbf{p} = [p_x, p_y, p_z]^T\) that lies on a unit sphere centered at the origin. What is the unit-length surface normal of the sphere at \(\mathbf{p}\)?

  2. Consider the cylinder depicted here:

    This cylinder has radius 1 and height 2 and is centered at the origin. Recall that in our mesh viewer, the \(x\), \(y\), and \(z\) axes are red, green, and blue, respectively. Your job is to derive a conversion from parametric representation of the cylinder’s shell (i.e., the round outside part, excluding the top and bottom caps) to \(x\), \(y\), \(z\) cartesian coordinates. Let \(\theta\) be the angle between the \(z\) axis and the point, measured in the \(xz\) plane with positive angles going towards the \(x\) axis. Let \(h\) be distance in the \(y\) direction from the bottom cap. In terms of \(\theta\) and \(h\), give expressions for \(x\), \(y\), and \(z\) coordinates of a point \((\theta, h)\) on the cylinder.

  3. Starting with your OBJ file from last lecture, add texture coordinates to make the pyramid look as follows:

    The texture we’ll use looks like this. Notice that the \((u,v)\) coordinates of a texture map range from \(0\) to \(1\), even if the texture is not square. You can get a clean, unlabeled version of the texture for testing here.

    Your pyramid should be textured so the bottom appears concrete and all the sides appear to be made of brick. Each side will have identical texture to the others. Since the sides are triangular, some of the brick texture will not map to any part of the object.