Assignment 9: OpenGL Part 1

Get the tar file opengl.tar.gz which has sample source. You might have to download GLUT which is available here.
  1. What we want to do is to convert the image from the log to an arbitrary surface given by parametric equations r(s,t) = < x(s,t), y(s,t), z(s,t) > using both quads and triangles. We want smooth curves so we will use the formula for the normal given by the cross product of partials r_s and r_t. Try to make the code so that changing the function is relatively easy. Here are some surfaces to try it on:
    1. z = x^2 + y^2 elliptic paraboloid
    2. z = x^2 - y^2 hyperbolic paraboloid
    3. z = sin(2 pi x) sin(2 pi y) 0 < x, y < 1 egg crate
    4. x = sin(phi) cos(theta), y = sin(phi) sin(theta), z = cos(phi) sphere
    5. x = (2+cos(phi))cos(theta)/4, y = (2+cos(phi))sin(theta)/4, z = sin(phi)/4 torus
    6. x = t cos s, y = t sin s, z = s helicoid