function setup() {
createCanvas(200, 20);
background(220);
text("p5.js vers 0.9.0 test.", 10, 15);
}
function draw() {
createCanvas(600,600);
fill(255,255,255);
noStroke();
rect(0,0,width, height);
//triangle 1 blue
fill(100,120,200);
noStroke();
triangle(0,0,width,0,width,height);
//triangle 2 green
fill(100,150,150);
noStroke();
triangle(0,0,0,height,width,height);
//semi-circle 1
fill(190,80,50);
noStroke();
arc(width/2, height/2, width, height, PI/4, 5*PI/4, CHORD);
//semi circlen 2
fill(230,170,100);
noStroke();
arc(width/2, height/2, width, height, 5*PI/4,PI/4, CHORD);
//semi circle 1 small
fill(100,150,150);
noStroke();
arc(width/2, height/2, 3*width/4, 3*height/4, PI/4, 5*PI/4, CHORD);
//semi circle 2 small
fill(100,120,200);
noStroke();
arc(width/2, height/2, 3*width/4, 3*height/4, 5*PI/4, PI/4, CHORD);
// eye circle 1
fill(230,190,180);
noStroke();
arc(width/4, height/4, width/5, height/5, 0, 2*PI,CHORD);
// eye circle 2
fill(200,140,210);
noStroke();
arc(3*width/4, 3*height/4, width/5, height/5, 0, 2*PI,CHORD);
// eye circle 1
fill(235,235,236);
noStroke();
arc(width/4, height/4, width/5, height/5, PI/4, 5*PI/4,CHORD);
// eye circle 2
fill(70,80,130);
noStroke();
arc(3*width/4, 3*height/4, width/5, height/5, PI/4, 5*PI/4,CHORD);
}
I wanted to make a smile/face something dynamic with two sides, but whole, almost like a ying and yang. Identity as both hidden and revealed.
The colors are based off a favorite Matisse painting of mine.