Project 2: Lighting and Transformations
Extending the geometry from
your first project or defining some new geometry, use instancing transformations
to define your final model and create an image with OpenGL’s full lighting
model. The appropriate geometry will depend on your choice of applicaton
area. Here are some suggestions:
-
2a (Mathematics) Add
axes to your previous function-surface model, defining a single instance
of an axis with a function and calling that function with transformations
to define all three axes. Add lighting and define the materials for
the surface to provide a realistic view of the surface. Continue
to use the idle function to display changing views of the surface.
-
2b (Chemistry) Read a
standard molecule description file and create a display of the molecule
with standard atom-coded colors. Use simple transformations to place
the atoms, using the pre-written functions provided by the instructor to
read molecular description files. The functions are online as molecules.h
(the header file for using the file reading functions) and readChemFiles.c
(functions to parse the PDB and MOL files). Use lighting and materials
to display the molecule in a realistic-looking way, and use the idle function
to display changing views of the molecule.
-
2c (other) Find an area
of science where there is a function of two variables arising naturally
from the principles or theory of the science. The physics projects
writeup has an example of the functions of electrostatic potential, which
is a good model for such a principle. Graph the function using the
processes of problem 2a above, including lighting and axes.
Examples of similar programs
will be given in class to show what each can look like in operation.
You might experiment with the material definition to see if you can create
things that don’t look like cheap plastic.
Due date: March
13, 2000.
Turn in your programs by e-mailing your source code to your instructor
and be prepared to demonstrate your running programs to him in the laboratory.
This project is worth 100 points and will be graded on proper documentation,
proper modeling, sound rendering, and correct display. Proper coding
techniques will not in themselves be included in the grading, but if the
instructor cannot understand your code, it is much more likely that you
will be asked to demonstrate your project to a skeptical audience.