Project 3: 2D Animation
This project explores the use of object-oriented programming in graphics, as well as scene hierarchies to perform transformations for 2D animation. To do this, students will create an animation withing Processing that will loop indefinitely. This animation is expected to be complex enough to require multiple objects (and therefore multiple classes) and have several levels of scene/shape transformations in order to create a range of interesting, cohesive movements.
Basic Requirements #
You will write the following:
- A 2D scene that is drawn via Processing within the sketch
project3.pde
. - Multiple objects that are continuously animated in this scene. These animations do not need to loop seamlessly. For example, an animated object might jump from the last position back to the first position, but this is acceptable as long as the animation continues.
- A project report to detail overall design and animation goals.
Your animation must have at least two classes for animating objects in the scene, and at least two levels of hierarchical grouping to form at least two levels of distinct animation using any of the following transformations: translate, rotate, scale.
You must also have at least two instances (objects) of class you create that differ in some way. For example, they may have different colors, or be transformed in different ways.
Finally, your animation must have some sort of narrative. This does not mean you need a story in the classical sense–for example, if you are animating a protein docking sequence, the docking is the narrative. However, your animation does need to attempt to convey something, rather than being a bunch of pretty shapes doing a pretty dance on the screen.
You may import 2D assets, like SVG files, to use in your animation.
Project Report #
Create a project report as specified in the Project Report rules
Make sure your report includes the following information:
- The narrative of your animation.
- What the included classes do
- How you met the two-transformation requirement
- Your two classes and what members they have
- How you met the two-instance requirement (e.g. how you have at least two objects that differ in some way)
- Any unexpected challenges you faced along the way
Language Model Log #
You should either submit a log of your language model interactions, or a statement that you did not use LMs for this project. In either case, you will need to submit a file in your project on your LLM usage. See the rules on language model logs for details.
Extra Credit #
Dynamic Quadtree (7 pts) #
An quadtree is a data structure which is used to partition a 2D space into boxes. By using quadtrees, a programmer can accelerate spatial queries. For example, if you are testing for collisions with a shape, you don’t need to check all shapes in the scene, just shapes within the appropriate quadtree cells.
Build a quadtree for your 2D animation scene. You should split quadtree nodes until further splitting does not change cell membership (this would normally be phrased as “split until each object resides in its own cell, but this is not always possible with quadtrees, so you should instead split until further splitting would not change what objects you’d need to look at).
Since a quadtree captures the location of each object, you will need to either update or rebuild the quadtree on each frame of the animation. However you choose to do it, you should make sure that your quadtree is always up-to-date, but that the rebuild or update process does not affect the timing of the draw loop. Your animation should still run at 60fps even while maintaining an accurate quadtree.
Detail your quadtree implementation within your report, including what logical checks you decided to use to split your nodes.
Submission #
Your submission should include the following:
- A Processing file named
youreid_project3.pde
that runs the animation. - All the necessary classes and subclasses for the Processing file to run.
- Any assets (e.g. OBJ files, textures, etc) that your animation needs to run.
- Your project report, with the information specified above and the project report guidelines.
- Your language model log
Place this all into a directory named youreid_project3
, zip the directory,
and submit it to Canvas.