Due 10 pm Mon April 30
A lupine, by Karoline Hayes.
In this project we will draw two-dimensional fractal plants. Part of the project is implementing and using transformation matrices. The basic project described below is worth a B, if done well. A program which draws something interesting, attractive or realistic is worth an A.
You may work with a partner on this project.
RequirementsYour plant should be defined using recursive functions, as described in the lecture notes. The "turtle" should be a 3x3 2D transformation matrix. To draw a leaf or other object with the position and orientation represented by the turtle matrix, you should load the matrix into the m_transform uniform matrix in the vertex program.
The plant should include at least leaves and stems, and its structure should include branching as well as rotation and translation.
Please construct the turtle matrix by defining your own 2D transformation matrices and multiplying them together as necessary. Do not use the glm functions to generate the rotation, scale or translation matrices. You may, if you want, use the glm matrix multiplication functions.
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 file.
Turn in all the source files of your program, the executable, the Makefile, any input data files, your .gif file, and a plain text documentation file called README, using handin. Thanks!
One obvious idea is to try and make realistic looking plants. Go outside and walk around. It's beautiful out. Look at all those plants. How would you describe their structures recursively?
For inspiration from the computer, here is a link to the on-line book on L-systems by the premier research group in Calgary. You should look at Section 8, and maybe other sections as well. The movies are great.
We will talk about generating curved (more or less) shapes in class over the next week or so; using curved shapes is a good extension.
As a technical exercise, you could to write a version in which the entire plant is drawn with a vertex program. One thing that will make this tricky is that vertex programs cannot use recursion!
Describe how you got your effects in a README file.