Due October 20, 2000
Image by Deborah Fowler
Your assignment is to create a lab that produces growing 2D plant models based on L-system growth techniques.
Your program should follow this specifications: When started, the program displays a window with the following menu buttons Plant1, Plant2, Plant3, Write PPM, Clear, and Exit.
When the user clicks the left mouse button on one of the menu buttons the following action takes place:
The starting location for drawing each plant should come from the location of the next mouse button press. The initial orientation of the plant should be straight up. Each repeated press of the same plant button should grow a new generation. It is intended that multiple plants can be grown in the same image; don't clear the window unless explicitly requested.
Positive rotation is counter-clockwise. The terminal symbol F indicates move forward a step of length d. Draw a line from the previous location to the new location. You should choose an appropriate initial value for the length of the plant stem (d) . For each successive generation, scale the plant segment length by 70%. The non-terminal symbol "X" should not be drawn. Your program should be able to handle 8 generations of plant growth.
Make your results as realistic as possible. Each of these should be added on additional buttons, so that Plant1 and Plant2 give the deterministic results described above.
Turn in your assignment by using the submit mechanism on gl. Include your c code, your Makefile, and an example ppm image produced when your program is run on the sample input. Use the project name 'lab3'.Your comments should include the environment (hardware and software ) that you used to develop your program as well as a description what outside help you got .
Course Assignments & Handouts | Links | Reading List