Project Title: A Nimble Kitten
Link here~ : https://editor.p5js.org/Lisa-HuangZijin/sketches/uEFsx5fJH
Brief Description and Concept: This is a cat that can stretch its body at will. I designed this because in our daily life, cats cat described as liquid due to their ability to get in anywhere. I also tried to move the legs so that it looks like the kitten is walking.
Here is a short video:
Coding: One of the biggest challenges is that I need the cat’s legs to move with its body in the right position. To deal with that, I test it many times till I found a satisfying formula. The second challenge can be that to let its eyes move with my mouse.
There is one problem remaining to be solved. I’m wondering how can I let the bubbles gradually fade while I am not keeping pressing the mouse.
- Describe what values were stored in the array(s) and how you utilized them. Share your experience while using the array(s).
I arrange 10 different circles using the array. For me, the array helps me order those circles and let them move in different directions at different speed.
- Explain when/why translate(), push() and pop().
I translate to make the different parts of the cat’s body move accordingly and together. Push() and pop() are used to not let the function “translate” influence next pattern.
- What is the effectiveness of User-Defined Functions?
The user can click mouses to release bubbles to attract the kitten. It is a simple way to let players interact with the kitten.
- What parameters did you added to your functions? How were they manipulate the effects of the functions?
I use sin() and cos() to let some parts move smoothly. I also use map() to interact with kitten’s eyes while ensuring them stay in a limited area (Inside the eye socket).
- Are you able to identify methods/processes in your programming that are radically changed because of the uses of the functions you defined?
Users can click their mouse to release bubbles and attracting the cat’s attention.