Computer Science I

PA 04

Creating your own Comic Strip


Deadline  : Tuesday, March 10th at the start of lab


Introduction

Now that you have learned a little bit about manipulating Pictures and images, the following Calvin and Hobbes cartoon from 20 years ago becomes kind of funny:

Ok, maybe not hah, hah funny, BUT, something that you could imagine building yourself if you had the right images.  Your task this week is to write a method that creates a comic strip using pictures of your choosing. The strip must have at least four frames in it. Here is a sample, a two-frame comic strip from the authors of our textbook:

After deciding on images and a theme, you will want to plan ahead a bit, to design the layout of your comic strip. Here is an example of the planning that the authors did while creating their sample strip.

Tasks

  1. In a file called PA04.py create a method called ceateStrip(). The createStrip() method should take NO arguments as input.
  2. Begin by creating a blank Picture.  You may make the strip as big as you would like, but try to keep it reasonable so that you eliminate excess white space in the background.
  3. Your comic strip must consist of at least four frames. You may lay them out as 4 in a row horizontally, or 2x2 in a square, or 3x3 -- however you. wish. The frames must be separated with lines.
  4. The strip must consist of at least two characters, whose images are taken from one or more files.
  5. At least one character must appear in two or more frames.
  6. The character that appears in two or more frames must be modified via code written by you in at least one way in one of those frames:
  7. At least one frame must have a caption, something that someone is "saying"
  8. You must write at least two helper methods that are called by "createStrip() to do its job. For example, you might have a method that copies an image to a location specified by (x,y) arguments, or you might have different methods for the various modifications you make to the characters' images.
  9. Your function must retrieve the image files it uses from the directory specified by the media path. To do this you must use getMediaPath(). You must not use setMediaPath() or pickAFile() in your solution.
  10. Do not use show() or repaint() inside your method. (If you want to do so while your are coding, fine, but be sure to remove those lines before you submit your program.)
  11. The LAST thing your createStrip() method should do is return the finished strip.

Thus, in order to test your code I will type:

>>> output = createStrip()
>>> show(output)
Notice that the Calvin and Hobbes strip above would not be a great submission because it doesn't meet a couple of the rules.  Also notice that this is basically another "collage" like assignment similar to the flag assignment in PA03.

Submitting your assignment

You should create a directory called PA04

Inside of this directory should be your PA04.py code file and all of the pictures that your createStrip() method uses to create the comis strip.

Furthermore, your directory should contain a copy of your FINISHED comic strip in a file called finished_strip.jpg.  To do this, you should figure out how to use the writePictureTo() method that is part of JES.  This method call should not be contained in your finished and submitted code.  Instead, use it during testing and remove before submitting your assignment.  Or, better yet, just use it from the interactions pane to write the resulting strip (output defined above) to the appropriate file.

Zip this file and submit the single zip file by the due date using the homework submission system.

Of course, you also need to submit a paper copy of PA04.py by the START of lab on the due date.  Printouts not on the front desk by 10:00 AM will be considered late and will lose several points.

 

Extra Credit Opportunities

If your comic strip uses a background picture from some image file in at least one of the frames, then you will be eligible for two (2) extra-credit points.

If you have other ideas for things that go beyond the basic assignment, propose them and I may award extra points.