Intro to Computer Graphics: Final Project

dth215 at nyu dot edu

Experimenting with texture mapping to 3D objects

See the code

Buttons to use...

  • f/g - adjust zoom
  • t - toggle the texture
  • s - change shape (sphere, spline patch, tube)
  • 1->9 - press number n, and texture is mapped n^2 times to shape
  • 0 - map texture 10x more onto shape
    (1->10; 2->20; 20->200)
The spline patch (the square) can be manipulated. Unfortunately I only have a kludgy interface right now:
  • press 'e' - enter edit mode, a red ball appears
  • Spacebar - edit the next point
  • Arrow keys - move point
  • +/- - change Z coordinates
Unfortunately (furthermore) the ball, which shows where the point should be is not being linearly interpolated at the moment, so it will not appear in the correct place. You'll see what I mean.

To make your own texture:

  • Press 'd' - enter draw mode
  • Press 'c' to clear drawing
  • Draw using mouse
  • Press 'd' again to leave draw mode
  • Use 't' to cycle through textures available (find yours)

Currently being mapped is a Gall Projection of the earth. The image is square, but mapping it to a sphere preserves the appropriate sizes of the land. Placing it on a square sheet (default appearance of the spline) shows how the gall projection distorts the earth. Putting it on a tube also distorts the earth more the further away from the equator.