Comp 360 Lab1 : Turtle Graphics

Due Monday, 14 September 2009, 11:59 PM

Overview

In this project you will implement turtle graphics as discussed in class. First you will create a virtual turtle that can carry out the basic turtle commands. Next, you will use your turtle to draw simple shapes. You will then implement operators, such as shift, spin, and scale, which you will apply to simple shapes to generate more complicated geometry. Finally, you will create recursive turtle functions that generate fractals.
This project is due at 11:59 PM on Monday, September 14th. It is worth 100 points.
You should work with a partner on this lab. As soon as possible, send an email with your partner's name and username to powei.feng@rice.edu. If you have trouble finding a partner, let us know and we will try to pair you up.

Specification

Within the code framework we have provided, the user may enter a text command by pressing the tilde (~) key. Doing so brings up a command line. When the user presses enter on this command line, any text she enters is passed as a string argument to the parseInput() function in Callbacks.cpp. In this lab, most user interaction will be in the form of text commands entered in this way.
When your program starts, the screen should initially be blank. Your turtle should be located at the center of the window, facing to the right. The turtle will respond to text commands entered in the program's command line. Those commands are given below.

Basic Turtle Commands (17 points)

Once you have implemented and tested these commands, you are ready to start writing turtle programs.

Simple Turtle Programs (17 points)

Turtle Program Operators (17 points)

Your program should also respond to the following fractal commands.

Turtle Fractals (17 points)

Flag of Freedonia (16 points)

Freedonia has just emerged from several centuries of a brutal absolute monarchy. Rufus T. Firefly, the newly elected democratic prime minister of Freedonia, has declared a contest among his citizens to create an appropriate flag for the new Republic of Freedonia to replace the old flag of the monarchy, which displayed a lion disemboweling a lamb on a bloody red background. You are going to enter this contest, using turtle graphics to generate a new flag for the fledgling republic. The best flag wins the grand prize, sharing a bowl of duck soup with the prime minister. Your grade will reflect the artistic quality of your flag.
Once again, you should document in your README the commands necessary to produce your flag.

Notes

What To Turn In

Create a "lab1" directory. This directory should contain your source code and all files needed to build your program in Visual C++ or with CMake. Also include a README file containing:
Only one partner per group should turn in code.
If your project will be completed late, email your labby and let him know.
Please follow the instruction on the home page of the class to submit your lab.



File translated from TEX by TTH, version 3.85.
On 27 Aug 2009, 14:11.