void setup() { size(640, 480); }; void draw () { background(60, 100, 55); int MainFaceX = width/2; int MainFaceY = height/2; int FaceSize = 300; //mainhead fill(255); ellipse(MainFaceX, MainFaceY, FaceSize, FaceSize); //lefteyeball fill(255); ellipse(FaceSize-50, MainFaceY-40, FaceSize-200, FaceSize-200); //right eyeball fill(255); ellipse(MainFaceX+80, MainFaceY-40, FaceSize-200, FaceSize-200); //mouth noFill(); arc(350, 300, 50, 50, 0, HALF_PI); //pupil right fill(0); ellipse(MainFaceX-70, MainFaceY-40, FaceSize-250, FaceSize-250); //pupil left fill(0); ellipse(MainFaceX+80, MainFaceY-40, FaceSize-250, FaceSize-250); };
Spend a lot of time to remember which part is what variable, what it affects and how to do properly the line and coordination of everything.
#when you have to look discreetly at someone
confusing code:
- deletes the line, eyeballs and mouth
smooth(); noStroke(); fill(255,0,0); beginShape(); vertex(50, 15); bezierVertex(50, -5, 90, 5, 50, 40); vertex(50, 15); bezierVertex(50, -5, 10, 5, 50, 40); endShape(); https://www.processing.org/discourse/beta/num_1246205739.html - credit