CS 534 Spring 2006 Assignment 1 The Angular Fisheye Projection The fixed function pipeline supports only a limited type of projection, namely one that can be described by a 4 x 4 matrix. In OpenGL, we almost always use glOrtho, glFrustum, or gluPerspective to describe a projection. With the standard perspective projections, we cannot get a 180 degree fisheye. Note that even as we get close to a 180 degree projection with standard projections there are large distortions as we get close to 90 degrees from the center. Sometimes we would like an even wider angle perspective, such as when we try to form an environment map. Another example, one that is of great interest at UNM, is forming 180 degree projections for domed environments. There are a number of ways of creating such images. Probably the most important is the angular fisheye projection. See http://astronomy.swin.edu.au/~pbourke/projection/fisheye/ A google search will yield many other references. Assume that our objects are all within a hemisphere that sits on a plane with the camera centered on the plane. A fisheye lens would see all the objects in this space and project them to the image plane. The angular fisheye approach is to draw linear projectors from the center of projection that project the objects onto the hemisphere. The hemisphere is then mapped to a circle in a plane. In the angular fisheye projection, the mapping to the plane is done is such as way that equal anglular slices on the hemisphere map to equal distances in the image plane. The equations are in the above reference. Note the similarity to the environment map equations in Chapter 8 of the text. The computation of such projections should be fairly straight forward using a vertex shader written in GLSL. In this assignment you are to write such a shader and use it to display projections from an application of your choice. Your application need not be very complex but it would be interesting to see how many frames per second you can generate with your program. You should also be able to obtain images by reading the frame buffer with glReadPixels. If you do this, you can then convert the image to a standard format (I have code for producing tiff images from RGB images) and we can display it on the dome at the ARTS Lab. For a given scene, determine if there is a performance penalty for using your vertex shader compared to the fixed function modified Phong Shader. Do this by animating your scene and computing frames/second. Finally, add a simple fragement shader that will mask out some areas and taper the color values near the edges of the unmasked area.