Homework One: Computational Thinking


Project Writeup

The following list contains the concise set of commands (the protocol)
that I developed with my first partner. I tried to write the commands as if
I was using the "Turtle" program, or as if I was speaking to a computer:

  1. Pen Down
  2. Draw a 2 inch horizontal line from left to right
  3. Turn 90 degrees downward
  4. Draw a 2 inch vertical line downwards
  5. Turn 90 degrees left
  6. Draw a 2 inch horizontal line
  7. Turn 90 degrees up
  8. Draw a 2 inch vertical line upwards
  9. Pen Up
  10. Pen Down at the bottom left corner of the square
  11. Draw a diagonal line connecting the top right corner of the square
  12. Define this diagonal line "L2"
  13. Pen Up
  14. Pen Down at the midpoint of L2
  15. Draw a horizontal 1 inch line to the right
  16. Pen Up
  17. Pen Down at the Midpoint of L2
  18. Draw a vertical 1 inch line down
  19. Draw a 0.5 inch horizontal line to the right
  20. Draw a circle of radius 0.5 inches within the 1 inch square
  21. Pen Up

This is the general image that the protocol should lead to:

I think the strength of the protocol was that it was very detailed. The lines had specific measurements and instructions for turning that allowed my shape to take on geometric figures that did not overlap. The protocol was also detailed to the point of being redundant. In other words, I would occasionally write: "Turn 90 degrees up...draw a 2 inch vertical line upwards." I think the weaker aspect of my protocol is that it was perhaps too long, and not concise enough. For example, depending on the definition of a command, I probably exceeded the 10 command limit. It is also possible that I could have figured out a way to make the protocol less than 21 statements long. However, if I were asking a computer to carry out my protocol, I probably needed a longer description. The computer would have to be told that "draw a line" means "draw a straight line." Another example would be that I assumed the actor who was carrying out my protocol knew what the "corner of a square" looks like. I could not make this assumption when writing code for a computer program.

I did parameterize most of my commands with measurements of length (inches) as well as specifics for directions for which to turn (as in degrees). However, I never used any degrees commands other than a 90 degree turn. In retrospect I should have probably specified in my description of the diagonal line, that a 45 degree turn up and to the left needed to be made. One other parameter that was used (that would probably have not been understood by a computer) was when I specified that a circle should be draw "within" a square (within representing the parameter).

My original idea was that I was going to write a list of commands that would have my partner draw a basketball. I did not get far into writing the commands when I realized that is would be almost impossible. Describing how to draw the archs that make up the basketball would have required extremely long and detailed commands if they were to be placed accurately (assuming the artist was to act similar to a computer, and not rely on previous knowledge of what a basketball looks like). I then tried to draw a very basic house, but I also realized that this would be very difficult to do with 10 commands. At this time I decided to resort to a shape configured solely of squares, circles, and triangles. The geometric properties of these shapes are such that it is possible to design interesting shapes within the framework of ten commands (for a computer). What I ended up designing was a square that was bisected by a diagonal line. Within the lower triangle was a square and within that square a circle was drawn. My first set of commands did not yield the design I wanted, only because I had some directions confused (meaning I got a few lefts and rights mixed up). My first partner helped to correct these statements and also helped to condense my commands into a protocol. For example, she suggested I define/label the diagonal line as L2, and this helped by eliminating some of excess commands. Therefore, the protocol worked much better than the first director/artist task.

In comparison to my second partner's protocol, I thought his was slightly better than mine. He managed to command me to make a 2-Dimensional arrow in a very limited number of commands. There was only one questionable statement in his protocol, and it regarded the turn at the tip of the arrow. I had a bit of confusion with the number of degrees he told me to turn, but I think this was the fault of my geometrically-challenged mind, and not necessarily a fault with my partner's protocol. Overall, I would say that my partner's protocol was better than mine because he achieved a shape of similar difficultly with few commands (at a low level of abstraction).

I thought the point of the exercise was to create a protocol with a low level of abstraction, assuming that the artist in the activity was supposed to act as a computer would in having no previous knowledge on shapes and figures. I therefore never thought of including any statements within my protocol such as "draw a face." However, because of this I had to make a relatively basic shape, with no complicated lines or turns. I did include a few commands that seemed specific at first, but came to realize that they were actually a rather high level of abstraction. I assumed that the artist would know what the bottom of a square was, and know what a corner looks like. If I was directing a computer in computer language I would have needed to be more specific.



Next Assignment: Turtle Graphics

Back To Home Page