CSci 1301: Lab 2

Due: Saturday, September 23rd at 11:59pm by e-mail

What to submit

The lab is done in groups of 2 or 3. In the beginning of each file please write (in comments) the names of 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 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. Also see an example of an animation.
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 text using strings, too!). Feel free to experiment with randomness.

All animations will be posted anonymously on the class web page and will be voted on. The top solutions 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 triangle, 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 background 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. Make sure all functions have signatures and good descriptions. Indent and format your code properly and use comments. Don't postpone 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.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.