02560 Web Graphics and Scientific Visualization

Week 4 - drawing a mathematical surface (triangle strips, wireframe, lighting, shading, and blending)

It is very useful in many visualization contexts to be able to efficiently draw and interact with a surface. The visualization of the image of a dyadic mathematical function as a surface (see Chapter 2 of DV) is just an example. The WebGL techniques that one has to use to implement such an example are quite essential, so I recommend that you work with a similar example to get a thorough understanding of the principles in drawing surfaces.

Pick a surface that you would like to draw. At this point in the course, I recommend that you choose a surface which you can describe mathematically. You can continue working on the example from DV or try to draw a torus or likewise. Try to go through the steps of drawing, lighting, shading, and using transparency. You should carefully consider the computation of normals. Remember to have a trackball in your visualization to enable interaction with the camera and try to do wireframe rendering as well as drawing a shaded surface.

The lecture example provides a step-by-step guide that you can follow. Alternatively, you can look at the projects associated with Chapter 2 of DV and work on those with an outset in the lecture example.

If time permits, look at the exercises associated with Chapter 1 of DV and the exercises associated with Chapter 2 of DV.

Reading Material

DV Chapters 1 and 2. Introduction and from graphics to visualization.
GL Chapter 8. Lighting objects.
GL Chapter 10, the sixth subsection (pp. 380-386). Alpha blending.