Project #2 Face Generator
Description
Face(Phase) Generator!
For some reason when I heard of face generator, it reminded me of the phases of the moon and how we perceive/represent it.It is not that uncommon to represent a moon with a face, I wanted to try something similar with the different phases of the moon representing different facial expressions and moods. Changing phases is a cyclic process, so are our moods throughout a period of time filled with good days and bad days. Facial expressions represent moods the best hence I made an attempt to communicate both.
DMoon Phases
Here we go!
- 1.Started with a simple circle and another circle with the same dimentions and colour the same as background
- 2.The second circle overlapping the first had MouseX as the first coordinate hence replicating the phase change Starry Background
- 1.Added a random function for varying diameters of an ellipse from 1,3
- 2.Used a for loop to randomly generate 100 stars giving the x and y coordinates as random variables as well
- 1. Draw ellipses in different positions and to show a moon phase along with it, another elipse overlapping it having the same color as the background
- 2. draw eyes and mouth with simple ark functions followed by rotate and translate
- 3. assign an ID variable and numerical value to each phase and a mouse the mouse clicked function generation a random ID value upon each click
Phases of the moon
Reflection
This assignment opened up to me with a lot of possibilities with p5.js. The outcome of the night sky exceeded my expectations in fact. Code can generate randomness but it's up to us to levarage it to potential. I'm definitely going to be exploring more possibilities of these.