Object Dancers
Object Dancers
March 30th, 2025 by Isaac Cheaz
Prof: J.H. Moon
SNOOPY!
PROTOTYPE!
Being completely transparent, my process for making the object dancer was to first ask DeepSeek to make a prototype as best as possible, then start roughing out the edges by myself. You can tell the vast difference in aesthetic between the AI-made dancer to the later polished version by me.Β
I initially wanted to make the dancer (snoopy) have a side profile since it was more iconic and hopefully more people could recognize him. However, I found that moving shapes around and testing the overlap of shapes was very tedious. Instead, I made the snoopy face the screen.
In the end, I couldn't really achieve the exact dance movements that the actual Snoopy does. Still, I'm happy with the design of the head, I think it's a huge improvement from the prototype.Β
What is the benefit of your class not relying on any code outside of its own definition?
It makes the code in a sense, more "portable". Since the code doesn't rely on any global variables or just code out of its definition in general, then only copying the class and its content is enough to bring the "dancer" into another "dance floor" (metaphors for code into another block of code).
What make it challenging to write code that has to harmonize with the code other people have written?Β Β
Codes that aren't organized and rely on code outside of its definition. As mentioned in the previous prompt, code that relies solely on code inside its own definition can make it more "portable", which harmonizes better with other people's code. This is especially useful in the object dancers project where we are tasked to create our own dancers who will later be grouped together in a single dance floor with other people's dancers (codes). Having a code that's easy to harmonize with other code makes it easier for everyone, especially for the one grouping the dancers together.
Describe the terms modularity and reusability using the example of your dancer class
Modularity refers to designing a system as independent, interchangeable components. Modularity in the Snoopy dancer class is demonstrated through its compartmentalized design, where distinct components of the dancer are managed independently. Each body partβsuch as the arms, legs, body, and headβis drawn through separate methods (drawArms(), drawLegs(), etc.), allowing changes to one part (e.g., adjusting arm movement) without impacting others.Β This modular structure simplifies debugging and iteration, as modifications to a single component (such as tweaking the head tilt) donβt risk destabilizing the entire system.
Reusability is achieved by designing the class to function as a self-contained unit. The Snoopy dancerβs constructor accepts startX and startY parameters, enabling it to be instantiated anywhere on the canvas, such as creating multiple dancers at different positions. Its internal state management (e.g., armAngle, bounce) avoids reliance on global variables, making the class portable across projects.