apple cat
Face Generator
Generates different apple cats with mouse click. Size/proportions and color variations use the p5js random() function, but parts/features will maintain their general positions on the face. Mouse position changes background color.
→ link to code
Design Process
From the start I knew I wanted to do something more fancy/with more parts. I was deciding between a regular cat and an apple cat, and ended up going with the apple cat because it’s a much more interesting image. Inspiration taken from the apple cat figure I have.
I laid out the shapes with p5.js, and set all values to be dependent on a variable “c”, the center point of the apple shape. The size of everything except the facial features are random on click within a set range. The apple and leaf color are random on click within a set color range, and the background color is dependent on the mouse position.
I spent the most time getting the eyes right. I took the outline of this sketch's code for my eyes. I was adamant about not using the rotate function to rotate the shapes, so I adjusted the points manually. I think ideally the eye shape would change with the face shape, but I had already spent too much time so I just left it a constant size. ⅔ of my declared variables are dedicated to those eyes and I think I could have done this with a much more efficient method. The nose and mouth do stretch with the face shape though.
some calculations:
At the end I added some text (meow) the same color as the apple that draws at a random position on the canvas on click.
Reflection
Going into this, I started with a specific image and reference of what an apple cat should look like. What I ended up with is a bunch of things that are kind of but not really apple cats anymore, evolved forms of apple cats. Some of them look cuter than others, in my opinion, some look closer to the original model, some look a bit different. In the process of defining my ranges, I had to make decisions on what I thought would constitute an “apple cat” and what would be too far off. In terms of shapes, I tried to keep it more restricted, but I left more room for variation in the color. So some of them are grape cats and orange cats and plum cats and cherry cats too.
Credits
This project uses code from this sketch for the eyes.