There is an error in Problem 4 on the homework distributed Wds! The normal vector should be: (-1,-3,-5), not (1,3,-6).
Due
11:30 PM Fri Feb 22
In this project we will draw two-dimensional fractal plants. Part of the project is implementing and using your own transformation matrices; this is so that you'll understand how they are used in OpenGL and other graphics systems. The basic project described below is worth 85 points. To do A-level work, you'll need to implement some additional features.
You may work with a partner on this project.
You may use any of the OpenGL functions for drawing primitives: glBegin(GL_POLYGON), glBegin(GL_TRIANGLES), etc., and you can set colors using glColor3f.
You must specify the transformations used by your L-system by specifying your own matrices, and loading them into the OpenGL MODELVIEW matrix. By loading your matrix into the MODELVIEW matrix, you allow OpenGL to use it to produce the correct world coordinates for each vertex. The OpenGL commands you may NOT use this time are glRotate, glScale, glTranslate, glMultMatrix, glPushMatrix and glPopMatrix - they are OpenGL's version of the matrix modification functions. Instead, you should keep track of your own 2D version of the MODELVIEW matrix, and modify it by post-multiplying it by translation matrices, rotation matrices, etc. You can use the function load2DMatrix in the starter code to put a 2D matrix into the OpenGL MODELVIEW matrix.
Your program should take the recursion depth of the L-system
as an integer input on the command line.
For example,
plant 5
should put up a window and draw the plant corresponding to 5 iterations
of your L-system.
Check out these ideas for improvments you can make to the project. Anything else that I think is interesting and/or neat looking might get extra credit, so don't feel constrained by this list. If you have a good idea, go for it! If you're wondering if it's a good idea, ask.
Look here for some advice about getting started.
Please take a picture of your best plant, suitable for framing or for display on the class Web page, and save it as a .gif. On the Dell machines you can do this using the grab function of xv. Type xv to get started.