Notes for March 29 -- Introduction to parametric surfaces

We wrote some code in class to implemented basic parametric surfaces.

In class we showed how to implement the simplest parametric surfaces, including cylindrical tube, spherical globe and torus (or bagel, if you are a New Yorker).

In every case, we wrote a function that maps any [u,v] to a point in space [x,y,z], where u and v each vary between 0.0 and 1.1.

For example, here is the function we implemented to describe a parametric spherical globe is this:

   function globe(u, v) {
      var theta  = 2 * Math.PI * u;
      var phi    = Math.PI * (v - .5);
      var radius = Math.cos(phi);
      return [
         radius * Math.cos(theta),
         radius * Math.sin(theta),
         Math.sin(phi)
      ];
   }

The code we wrote in class is here.

 


 

Homework (due before class on Tuesday April 5)

For this assignment I want you to build interesting scenes built from parametric surfaces. At the very least, use the three types of parametric surfaces that we built in class.

In order to create a unique instance of a shape, you can change the value of the matrix. Then when you draw that shape, it will show up in a particular unique position, orientation and scale.

For extra credit, see if you can make your own kinds of parametric surfaces, very different from the ones that I showed in class.

As always, try to have fun with the assignment. See if you can create something funny or personal or dramatic. Try to animate things, and use the cursor to make things interactive.

Surprise me. :-)