CSci 1301: Lab 2

Due: Monday, September 16th at 11:59pm by e-mail

What to submit

The lab is done in groups of 2 (preferred) or 3. In the beginning of each file please write (in comments) the names fo all group members.

At the end of the lab please send me and your group partner(s) all your Racket files as e-mail attachments. My e-mail is elenam at morris.umn.edu. The subject of your e-mail must be "1301 Lab 2" followed by "Final" or "Not final", depending on whether this is a final submission or you are still working on it. If you need to finish it, make sure to set up a time with your group partner(s) to finish the lab.

The lab task

Your task is to write a simple animation, something similar to (and building upon) the rocket landing example from Prologue which is also posted on our resources page. Your animation may be constructed out of shapes, pictures, or a combination. Use your imagination, and then build your animation step by step, running it after each modification. Focus on good code style (use variables, helper functions, meaningful names, comments to clarify your code). Browse the image.rkt teachpack to see what's there, use various elements (you can write messages using strings, too!). Feel free to experiment with randomness, too.

All animations will be posted anonymously on the class web page and will be voted on. The top three will get extra credit.

Your animation must satisfy the following requirements:

  1. It has to have a background that stays the same for all or most of the animation (it can be just a rectangular color shape, or it can be more involved).
  2. It must have at least four moving basic shapes. A basic shape is either an image that you insert or a shape given by a pre-defined function such as a circle, a rectangle, a trinagle, a line, etc. The shapes can move together (e.g. an airplane) or separately.
  3. The size of the scene must be given as constants and should be adjustable, i.e. if I change the size of the scene your animation should adjust: it doesn't have to scale every image, but at least the backgroun and the position of the objects (centering, etc should be reasonable).
  4. It has to follow good programming style. Make sure to use constants and helper functions to avoid code repetition. Use good names. Indent and format your code properly and use comments. Don't pospone cleaning up the code until the end: any time you see an opportunity to imporove your code, do it. Code style will be a significant part of your grade.

CSci 1301 course web site.