Mini Project 6: Object Dancer

 

 

 

 

 

For this mini project, we were directed to make a character that danced, in order for it to compete in a dance competition with the rest of the dancers. To illustrate my idea through code, I first created my dancer by coding numerous ellipses with varying sizes and positions. I decided to go with the idea of a cat, whose dancer name is Spazz Cat. The concept of this project was to implement object-oriented programming, designing our own self-contained classes, and constructing objects while manipulating their properties by using methods defined within the classes. After I created my dancer, I spent much time testing out different ways for it to move that was not typical. The name Spazz Cat origins from its unique dancing type. I wanted to demonstrate movement that all correlated with each other, to make the dancing cat more natural looking. I utilized the rotate approach in the codes where each aspect and limb of the cat was drawn to establish the movements, while also defining properties by using “this” keyword. As seen in the code images above, I made various properties correlating with different limbs in order to variate between the speed of which the objects move. To make things more interesting to look at, I made the arm movement speeds different as one moves faster than the other. I also added features of randomness like the dancer’s belly color, eye shine color, ears color, and a lightstick. The benefit of having the class not relying on any code outside of its own definition is that variables are easier to manipulate and change, while also keeping the code tidy. It ensures that all codes written inside the class are contained, and function together. It is challenging to write code that has to harmonize with codes that other people have written because some variables may have more than one definition, which can mess up codes. Modularity is when a system is composed of numerous aspects, which can be broken into multiple parts, simplifying the overall set of components. Reusability in code signifies how codes can be continuously implemented in different parts of the code through defining them as flexible variables.

Leave a Reply

Your email address will not be published. Required fields are marked *