| Examples of Texture Mapping |
|
|
|
|
|
| Above are
screenshots taken from example programs provided by the OpenGL
Programming Guide.
|
Using a PPM File as a Texture |
To the left is a screenshot of an OpenGL program written to apply a
texture to a sphere. The texture is a PPM file specified at the command
line. Any PPM file in binary format can be read and applied to the
sphere provided the dimensions are a power of 2.
Source code for the program...
|
Using a Series of PPM Files for an Animation |
To the left is a screenshot of an OpenGL program written to apply a
series of textures to sphere for an animation. The textures all must be
in binary PPM format like above. The directory of the PPM files and the
timestep of the animation can all be modified at the command line. For
the example to the left a series of PPM files showing the sea surface
temperature anomalies from May 1997 to January 1998. A Quicktime animation of the
program can be found here. Or
if you want to learn more about where the images came from go to the Reynolds Sea Surface
Temperature Anomalies page.
Source code for the program...
|
| All code
used to create these images can be downloaded here -> hw09.tar.gz
|