Cover page images (keyboard)

Project 2 - Recursive Curves


design2.txt - due on Monday, 5/9/11, before 11:59 PM
project2 - due on Sunday, 5/15/11, before 11:59 PM

Sue Evans

Hit the space bar for next page

The Objectives


Experience working on a larger problem using good design practices including:

For this project, you'll be required to use your own design.
A separate design document is due one week before the project code.

The Design Document

The design document for this project, design2.txt, should be a plain text document written using emacs. It should include:

design2.txt is due Monday, 5/9/11 before 11:59 p.m.

Use the following submit command to submit it.

submit cs201 Proj2 design2.txt

How much does the design document count ?

The design document is worth 10 points of your project grade if it is submitted by its due date. There should be few variations between the design you turn in and the actual design of the project you turn in the following week. If your grader decides that you have altered your plan too much, a deduction of up to 5 points can be made for major changes.

The Background

Recursive Curves

We've looked at the Koch snowflake recursive curve on the lecture slides. Recall from the lecture, that the Koch snowflake starts as an equilateral triangle. So a Koch snowflake of degree 0 looks like this:

Here is a drawing of what each side of the snowflake looks like for each degree from 0 through 4, inclusive:

There are other recursive curves as well. Some are quite beautiful and intricate. This one is known as the dragon curve.

And this is the C-Curve

The Task

What's a Turtle

According to Wikipedia, "Turtle graphics is a term in computer graphics for a method of programming vector graphics using a relative cursor (the "turtle") upon a Cartesian plane. Turtle graphics is a key feature of the Logo programming language."

Here's an example of the turtle being used to make a drawing in Logo.

The Details

Extra Credit

For 5 points of Extra Credit, add a choice D to your menu, which allows the user to view a dragon curve being drawn. The dragon() function MUST be recursive.

Submitting your work

You must be logged into your account and in the same directory as the file you are trying to submit.

To submit your project, type the following at the linux prompt:

submit cs201 Proj2 proj2.py turtle.py util.py

To verify that your project was submitted, you can execute the following command at the Unix prompt. It will show all files that you submitted in a format similar to the Unix 'ls' command.

submitls cs201 Proj2