Small Assignment 2: Processing and Turtle Geometry

Due Dates

Assignment : 9am, Tuesday February 1
Comments: 9am, Thursday February 3

Description

The purpose of this assignment is to give you an opportunity to experiment and play with Processing and Turtle Geometry. It will also give you a chance to explore some foundational geometry. Create a Processing program with the following elements.

  1. Polar plot: Write a procedure that draws a beautiful polar plot, using some of the techniques we went over in our second class. Your procedure should expand on what we went over in class in some way. Do not use turtle functionality in this procedure.
  2. Centered Circle: Write a turtle-based procedure that takes a radius as an input and uses a turtle to draw a circle of the given radius, centered at the turtle’s current position. The turtle should return to its original position, the center of the circle, at the end of the procedure. The only element drawn on the screen should be the circle.
  3. Flower: Write a procedure that draws a flower that looks like the one in the image below. The procedure should take the number of petals as an input variable. The petals should fill an entire circle and should not overlap. The flower below, for example, has 11 evenly spaced petals. You can use Processing’s built-in ellipse function to generate the filled center of the flower if you want.

    The petals should be generated by a separate turtle-based procedure that has an angle as an input variable. This input will determine the petal width. The petal procedure should generate ice-cream-scoop shaped petals. See the images below. You’ll need to do some geometry to figure out the path the turtle should take to draw them.
  4. Turtle Drawings: Write three different turtle-based procedures that draw interesting or beautiful patterns on the screen. Each procedure should explore a different kind of turtle behavior. Each procedure should include at least one parameter. At least one of the procedures should draw asymmetrical shapes.

Each element should be included in your code as a separate tab. At least one of your procedures should incorporate an element of interactivity. For example, the shape of your polar plot could change based on the position of the mouse. You are welcome to incorporate interactivity in more than one of your procedures.

What to Hand In
Create a post on this website that documents the work that you did. Your post should be organized into separate sections for each of the four elements and should include:

  • A description of how you addressed each of the assignment elements. Describe any challenges you experienced. Where relevant, describe why you chose the patterns and parameters you did for images you share.
  • Images generated by your program. At least: one for elements 1-2, two showing different numbers of petals for element 3, and three for element 4. If you want to include more images (to improve your description or explore different parameter values) that’s great.
  • Your code. Name your program using the following convention: FirstnameLastnameSA2. (SA2 = Small Assignment 2.) Browse to the folder that contains your processing program and compress this folder to a .zip file. Upload the .zip file to your post. For information about how to upload .zip files, see this page.
  • Follow the Code Style Guidelines. Make sure you add a header to your main tab, as described in the guidelines.

Add your post to the “Small Assignment 2 – Turtle Geometry” category.

Discussion

Read and comment on the posts of at least three of your classmates.