CS152 Fall 2021

Computer Programming Fundamentals
Home
Schedule
Syllabus
Style Guidelines

Assignment 5: L-Systems
Due: Monday November 8 by the end of the day (11:59pm)

Description

Create two different L-Systems. These LSystems should have different rules from the ones we went over in class. At least one of them should generate a botanical form. Iterations of the first LSystem should be drawn when the '1' key is pressed and iterations of the second LSystem should be drawn when the '2' key is pressed.

Each different L-System consists of a different rule and starting word. It should also have its own size and angle parameter values.

Requirements

Your project should include all of the elements below.

  • The screen should be at least 600 pixels by 600 pixels.

  • Your program should include 2 different LSystems

  • Both LSystems should be different from the ones we went over in class

  • At least one of the LSystems should generate a botanical form

  • At least 4 iterations of your LSystems should fit on your screen. Adjust the scaling and position of each LSystem to fit.

  • Iterations of the first LSystem should be drawn when the '1' key is pressed and iterations of the second LSystem should be drawn when the '2' key is pressed.

  • Your program should follow the basic structure we went over in lecture.

  • Include the appropriate source code header in your main class. Your main class will be a variation on the LSystemVis class we worked through in lecture.

  • Carefully read and follow the course Style Guidelines.

  • Extra credit (5 points): Generate a 3rd LSystem that generates a botanical form. This LSystem should be drawn using complex shapes like circles, rectangles, and polygons instead of lines. It can include some lines, but other graphical elements should make up the majority of the form.

What to Hand in:

  1. Your program. Browse to the src folder inside the project that contains your code. Compress the src folder into a .zip file. Rename this file using the following convention: FirstnameLastnameAssignment5.zip. If you're working in a team use this convention: TeamLastnameLastnameAssignment4.zip. Upload the zip file to Learn. Make sure the file uploaded properly before you submit your assignment! If you do not know how to create .zip files, check out these instructions for PC and mac OS.

  2. A paragraph about your project. In Learn, also submit a paragraph about your program and how you designed and implemented your LSystems. Include a brief discussion about your experience working on this assignment: what challenges did you encounter? how did you address them? what was hard? what was fun? what did you learn?