Phase 1 due Monday, February 16
Phase 2 due Sunday, February 29
You must design and implement a language for animating shapes (similar to a limited form of Flash animations). Shapes should be able to move around the screen, resize, bounce, or jump to random locations. Here are three examples of animations in action.
Shapes can be circles, rectangles, or polygons (circles and squares have fill colors, but polygons are just outlines). When specifying a shape, a programmer can give "variables" to represent the shape's dimensions (such as a circle with a center at "x" and "y" and radius "r"; a square could be a rectangle with width and height the same length "l") and initial values of those variables. To animate a shape, the programmer specifies how much some of these dimensions will change and over what time (in seconds). For example,
For this project, you will provide:
A language for specifying animations as described above, and
A program (interpreter) that will run an animation written in your language, displaying it on the screen.
Both the language and the program must support three kinds of animations:
You will do the project in two stages: a language design stage, followed by an implementation stage. Each stage has a separate due date, as described below.
The goal of the project is to make sure each student can define, design, and implement a domain-specific programming language. This is an individual project -- you may not work with your homework partner, or any other students, on this project (see the collaboration policy for more details).
For this phase, you must propose a language design for animations. You must submit both the proposed language and examples showing how to represent the second and third sample animations, plus an animation of your own with random jumps, in your language:
You do not need to be able to run animation programs at the end of this stage. Macros for the language are not needed at this stage either (you can add those in the implementation stage).
Submit an electronic file design.scm or design.ss (under turnin name project-design) containing your work for this phase.
For this phase, you must provide a function
run-animation that takes an animation in your language
and runs it (displays the animation on the screen). Your animation
should happen in one window over time---you are not trying to produce
a sequence of still frames as shown in the samples.
We will use the draw.ss teachpack in DrScheme for the graphics (not the images material that you used for homework 2).
You may decide to revise or enhance your original language design as you try to implement the language. That's fine. Your project report will describe all changes you decided to make.
Provide a text file with answers to the following questions:
What must the TA do to run your program? Provide concrete instructions (such as "execute (run-animation animation1)"), including a list of the animations you defined as your test cases. The TAs won't grade a program that they can't run.
What is the state of your implementation? Explain which features/aspects work and which don't. If you didn't get the random jumps to work, for example, say so. This gives the TAs guidelines on how to test your system.
How have you changed your design since the version you submitted for the design deadline? Explain the changes and why you made them (i.e., I found I couldn't do X because of problem Y with my earlier definition). We're interested in seeing what doing the implementation taught you about the language design.
What, if anything, do you think could be cleaner in your design or implementation? If you are satisfied with your design, say so. If you think certain aspects should really be easier to use, easier to write, etc, explain those aspects and what you'd like to see different. No danger of losing points for honesty here (you'll only lose points for problems that we can detect without reading your report) -- we just want to hear your assessment as we determine our own.
A file animations.scm or animations.ss containing your work for this phase.
A file report.txt containing your project report. Please submit these in plain text, rather than in Word format.
Submit these via turnin, under the name project-final.
In general, the design phase counts for 25% of your project grade, the implementation phase (including final language design) for 70%, and your project report for 5%.
We will grade your language designs on a 4-grade scale (check+, check, check-, no credit). At this stage, we're looking to see whether you thought out the design phase well -- did you identify appropriate data, control, etc? Does your design adequately support the given examples?
There's no single right answer for this part, and while we will make suggestions on your designs, we won't give you a single right answer to follow when doing your implementation. Part of the exercise is for you to have to work with, and perhaps revise, your initial language design when it comes time to implement your animation system.
In the implementation phase, we will be looking at your final language design and its implementation. More specifically:
A passing (C) grade on the project requires a reasonable language design for shapes that can slide or bounce in one dimension and a run-animation function that correctly processes the (smaller) portion of the language that you're specifying.
A grade of B requires that your language and interpreter all three animation styles (slide/bounce/random) over multiple dimensions using variables. The final language design also has to be fairly good.
A grade of A requires that you satisfy the requirements for a B grade, and that you provide a cleaner, macro-based interface to your language for animations. You should also have a very good language design for an A.
You are welcome to add extra kinds of animation to your language, but new features will not make up for missing required elements of your language. Adding features while your program isn't yet robust will cost you points.
We will grade your report for writing (complete sentences, spelling, punctuation, clarity, etc) as well as technical content.
We will look for whether you followed good coding practices, such as uses of helper functions, in your prototypes.
We expect you to follow the Laws of Homework on this assignment, with the exception that you may use begin where appropriate. Contracts are expected. You do not need to include the test cases for the individual functions (but we hope you are testing as you go along nonetheless).
This is an individual project. Collaboration is not permitted on this assignment. The course staff are the only people you may approach for help with this project (but do come to us if you need help). You may not ask anyone outside of the course staff questions on any aspect of this project. This includes:
Violations of this policy follow the general course collaboration policy, and may result in an NR for the course.
Why this policy? Given the fairly open collaboration policy on homeworks, this assignment helps me assess how much each student understands of the course material. Since some students struggle in timed situations such as exams, the project gives you a more open-ended setting in which to demonstrate what you've understood of the course material.