Grammar based methods

 

Reading

Read section in Algorithmic Beauty of Plants on L-Systems. You can also browse the Full Text and the companion website

Class startup

git checkout master
git pull
git checkout working
git merge master
Impatient? Git not being friendly today?
git fetch origin
git checkout -b plants origin/master
You will not be able to push from the temp branch. You must add a symlink before running today's code. Note the space between textures/ and data
cd ~/cs40/code/w09-grammar/
ln -s /usr/local/doc/textures/ data
Switch to your working branch, open qtcreator, and set your executable to gramtest in w09-grammar. Getting the black screen? You symlink is probably broken. Set it manually in your build directory, e.g.,
cd ~/cs40/code-build/w09-grammar
ln -s /usr/local/doc/textures/ data
If a link called data already exists in your build directory, but points to the wrong thing, you must remove the wrong symlink first using rm data before setting the right link.
Initial Explorations
When you first run your program, you should get a texture mapped sphere. You can rotate using the x,y, and z keys. Use the s key to toggle shapes. The sequence is sphere, square, cylinder (new) and (stumpy) tree (new).