CS W1007x Introduction to Computer Science - Spring 1998

Homework #1 (5 points)

Draw Your TA

Start from the code shown in class: trygraphics.c code

Due Date

9:00pm Wednesday, February 11 (section 2); 9:00pm Thursday, February 12 (section 1)


Chapter 3 and also Section 7.2 ("The Art and Science of C" by Roberts)

Your Mission:

In this assignment, you get to draw your TA! (If you don't feel like drawing your TA (or, heaven forbid, have not met her or him), you can draw the instructor.) It's going to be a crude picture using lines, arcs, and circles, but we will consider it to be a success if it vaguely resembles a person. It will be a great success if we can actually figure out which TA it is or if the picture conveys something of his or her personality! Be creative!

This week we are covering variables, some simple conditionals, loops, and a variety of graphics functions in class, so you have all the tools needed to complete this assignment.

The requirements for this program is:

  1. At least twenty (20) lines, arcs, or circles as part of the drawing. (Include a few of each to demonstrate that you know how to use them.)
  2. At least one loop to draw a repeated part of the scene. For example, use a for loop to draw some grass at the TA's feet. Or, give Robert a goatee. (This is also a great way to get a whole bunch of items drawn to work up to the required twenty!)
  3. There have to be at least two possible scenes that can be displayed. For example, there can be a happy TA and a sad TA. The difference between the two does not have to be much, e.g., a frown versus a smile.
  4. A user-friendly query allowing the user to input which scene they would like to have displayed.
  5. Organize and group your drawing instructions into logical units. For example, group the commands according to which part of the body they are used to draw. Provide a comment for each of these groups of drawing instructions.

If you run into any complex mathematical formulas for calculating the placement of objects, you have gone beyond the scope of this assignment. This is OK, however, so feel free to ask for help from the TAs or the instructor.

Recitation sections: For this and each remaining homework (every other week) there will be a recitation section offered by the TAs. You are strongly encouraged to attend! This will help you solidy concepts, learn more technical Unix, EMACS and C overhead, and ask more questions. You should go to the course web page to see the schedule for the current recitation "batch".

Submitting your work: The following information will be made available on the the course web page: How to submit it on-line, and who to submit it to. Before then, do not submit in any way. Submission will be electronic but not through email. You will also be required to hand in a hardcopy.


If you run into any difficulties at all, please come and see us. We will be more than happy to help! You can always see the current office hours on the course home page, http://www.cs.columbia.edu/~evs/intro/overview.html
email: evs at cs dot columbia dot edu (Thanks to Andrew Kosoresow and Ivan J. Leichtling for helping develop this handout.)