Project 2 Form Generator - An's Crazy Cat

Description

I always want a cat, but I'm that kind of person cats hate. It's probably because I stroke cats when they don't want to be touched. But that's ok. I will create a cat in code that always happy as crazy when I touch him!

Design Process

I first created a couple of sketches that depict the maximum and minimum scale. I change the appearance of the cat when I redraw him in P5.js. I feel he looks cuter than before.

I didn't think of the movement of his tail in my first sketches, so I have to calculate that on my sketchbook.

The tail is first designed to follow the mouse. But then I find his tail is too close to the right, so it looks too long when it follows the mouse to the left. In the end, I decide to use random() to narrow its movement in a small range, and it won't follow the mouse.

As I design, the color of my cat will become lighter when you click the mouse key, because your touch DELIGHTS the cat.

KeyPressed() didn't work for me at first, so I made a small test. I find out that mouseX and random() can't be defined as variables. Console gives me erro reports when I try to run the code, Let X=mouseX; .

Url to my test: https://editor.p5js.org/konga581/present/jifjIhaEB

Reflection

1.Make interaction using keyPressed(), mouseX, and mouseY.

2.Understand curve code in a mathematically. Turn hand-drawn sketch into numbers and codes that P5 can understand.

3.Understand how four coordinates in Bezier define a curve, and use this discovery to create an interactive curve in P5.

4.Use random() to make a random movement.

5.Manipulate RGB value to get a series of colors I like.

6.It is always good to create small tests separate from the major work. Changing variables and looking for errors line by line might kill you.

New things to think about/try:

*What is the different between keyPressed() and keyIsPressed()?

*Try to import a new font to P5 with the correct format.

*Try to make a button (a shape only changes color when you click on it).

*Do small tests before you start to write a bunch of codes. Small tests might save you a lot of time and energy.