Assignment 4: Due December 21, 2018 at 11:59:59 pm. Submissions a second later than this will NOT be accepted.

Overview

The purpose of this assignment is to make use of the material taught in class and the practical exercises we have been doing in the labs.

Your task is to render a plant using L-systems and a simple grammar. You will define a set of grammars, a recursion depth and a thickness parameter to relate plant girth to the resulting branch depth. You can define the input parameters for your grammar however you wish, but it must be read in from an external file at run time.

The grammar loaded from file will define how the plant's spine is defined. The girth defines how thick the plant's spine is at the root of the plant. (It should shrink in size as smoothly as possible towards the leaf nodes).

Finally, you must go outside and take a picture of a plant/tree that is similar in shape to your L-Systems plant/tree. (Note: It might be easier to tweak your L-Systems plant/tree to look like a real one). You will provide an example grammar file that matches your picture.

The L-System plant must be seen from all sides. You can simply rotate it if you like, or you can use your arcball code.

Input/Output Specification

You must implement the L-system spine rendering and can be toggled on/off by pressing the 's' key.

You must implement the L-system girth rendering and can be toggled on/off by pressing the 'g' key.

eg.

assignment4 mygrammar.txt

Note: It might be helpful to use your arcball implementation from assignment 1 to debug this.

Grading rubric

The grading for this assignment is as follows:
5% - Your program compiles without errors or warnings.
5% - Your program brings up an OpenGL window with the specified characteristics.
15% - Loads a text file describing your L-System.
15% - Render the L-system plant's spine.
25% - Define an L-system and produce the spine of a plant with at least recursion depth of 5.
15% - Render the L-System plant's girth.
5% - Rotate the plant/tree.
10% - Interactive update rates.
5% - Tree picture
All necessary code and data must be tar and zipped into a file with your full name or student number. eg. FirstLast.tar.gz or 123456789.tar.gz

Code Files

No code files beyond what is provided in the labs will be provided for this assignment.