Week 2: Coding Assignment ‐ Generative Cartoon Eyes - kalibirdsall/Creative-Coding-Class-Wiki GitHub Wiki
For this week's assignment we had to create a generator that produced many instances of a thing. I choose to create a Cartoon Eye Generator.
Links to p5.js: 1st version: https://editor.p5js.org/kalibirdsall/full/PEC7Q0MbS 2nd version: https://editor.p5js.org/kalibirdsall/full/4XB1dOF6O
The videos tutorials I watched this week had a lot of complicated info in them so I decided to look for the sketch that one of the Dan Shiffman videos had of a house generator, and to try to work from that sketch. The sketch looked really complicated! I looked it over trying to find important parts that would be relevant to me. I managed to make an eye that didn't change shape or move, but the color of the iris of the eye randomly generated. I added randomly generated dots to the background based on one of the videos tutorial exercises, and I liked how it looked overall. I was kind of proud of myself for managing to get this far, but it kind of bugged me that none of the shapes were changing size/shape because I'd really wanted that when I was working on my hand sketches, so I decided to keep this sketch, and try again.
I went back to Shiffman's original house generator sketch and I decided to try to simplify it down a lot so it felt more manageable. I started by deleting different sections of the sketch that seemed like I would not need them. I eventually deleted everything except for 1 rectangle that generated in different sizes. Then I changed the rectangle to an ellipse. Voila! I had my sclera (the white of the eye)! Now I had to move the iris, pupil and highlights from my first eye generator sketch over to this one and center them on the randomly generating sclera. I wanted there to be 2 eyes, so first I moved the sclera over to the left side of the screen. I tinkered with various values until I figured out how to move the sclera. And with trial and error, I got the pupil and highlights correctly aligned. Try as I might, I could not get a second sclera to appear. I kept getting error messages. Finally I decided that it still looked cool and I liked it so I was going to stay with this for now. Done! :-)
Below are images of the hand sketches I did before starting along with my first attempt and second attempt.