Imaginary Creature
Imaginary Creature
Brief Description and Concept: For Week 5 in Creative Coding, our class learned about transformation functions and (User-Defined Functions). For this week’s exercise, we were challenged to sketch an imaginary creature drawn by using transformation functions. Using the defined functions, we can effectively alter elements of each body part.
Demo/Visual Documentation: (link)
Coding: (Link)
Reflection/Lessons Learned Questions:
- Explain when/why we use translate(), push() and pop().
- What is the effectiveness of User-Defined Functions?
- What parameters did you added to your functions? How were they manipulate the effects of the functions?
- Are you able to identify methods/processes in your programming that are radically changed because of the uses of the functions you defined?
Answer:
With push and pop, I used the translation function to keep things organized and grouped so that it does not affect the rest of the script. Each body part can be easily manipulated since they possess the same variables and translation. Furthermore, the transformation function is the most helpful for the turning shift.
Define functions to help avoid repetition. Furthermore, with its parameters, I could easily manipulate the imaginary creature’s size, speed, size, color, and location. Although I maintained both creatures’ characteristics the same they can be easily changed without having to do much. With the help of these functions, I do not have to make repetitive codes.
Throughout this process, I used a lot of transformations and the function’s parameters as they can help make quick changes by group instead of individual objects.