The final project is open-ended. Pick something that you like and/or you want to learn more about. You can choose to work alone or in a team of two people (if you work in a team the amount of work for the project should scale up accordingly). A list of topics is suggested below. If you have any other ideas you have to run them by me.
Note: "final" in "final project" should read as "final=the last one". It does not mean that it has to be bigger or that it is more important than Project 1 or 2. All the project ideas listed below are doable in 10 days of work. This time there is no extension! it has to be ready by the due date. We want to end the semester on a positive note! So manage your time carefully and start working asap (please no segfaults the night before it's due..)
W(x)
of a point x
in the
grid is the set of points in the grid that flow to point
x
. Assume you start with given elevation, flow direction
and flow accumulation grids. The first part of this project is to
compute and display the watershed of an arbitrary point in the
grid. The second part is to ask the user for a threshold value
r
and compute the watersheds of all points with flow
accumulation larger than r
. For a given r
,
this defines a partition of the terrain into watersheds. As this
threshold increases, the number of watersheds goes down and the size
of each watershed goes up.
For lighting, you'll need to specify the direction of the normal to the surface in each point. You can easily compute the normal to a point using the equation of the plane that goes through the triangle, the problem is that a vertex may be part of several triangles, and in each one it will have a different normal. This will look really bad (try it!). In order to get good lighting effects you have to compute the normal to a point basically by averaging all normals in all the triangles that contain that point. In this way a point will have the same normal in each triangle. This comes down to figuring out the neighboring triangles of a point in a grid (TIN). The elegant way would be to build a TIN from the grid that stores also the topology, not just coordinates---i.e. for each vertex the list of triangles that contain it.
Another idea is to extend your grid visualization to handle pgm picture format. This format is very similar to the ArcAscii grid format: the picture is stored as a list of say 640 by 480 pixels, each of which has an associated value in the range 0-255, representing its color. Here is an example: pic1.pgm. You can read in a picture just like you read a grid and render it in 3D by interpreting the color as height. Of course it wil not look good since the color is not continuous. Then scale it down (the multiply function) and watch how it starts to resemble a picture.
Another idea is to implement a fancier animation through the terrain (fly-through?). Or try to obtain a rain effect by having drops (circles) start out of each grid point and flow downhill using the flow directions.