xxxxxxxxxx
126
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
}
function draw() {
background(119, 115, 141);
// Sans();
Papyrus();
// pixelHeart();
}
function Sans() {
//skull
noStroke();
fill(255);
ellipse(200, 178, 70, 55);
ellipse(200, 200, 67, 40);
//eye sockets
fill(0);
ellipse(185, 180, 20, 15);
ellipse(215, 180, 20, 15);
//nose?
rect(200, 194, 9, 5);
rect(200, 189, 5, 5);
//eye lines
stroke(0);
strokeWeight(2);
line(193, 183, 185, 191);
line(185, 191, 180, 191);
line(207, 183, 215, 191);
line(215, 191, 220, 191);
//pupils?
stroke(255);
strokeWeight(5);
point(186, 182);
point(214, 182);
//smile
fill(0);
noStroke();
beginShape();
curveVertex(178, 200);
curveVertex(178, 200);
curveVertex(195, 203);
curveVertex(203, 203);
curveVertex(221, 200);
curveVertex(221, 200);
endShape();
beginShape();
curveVertex(172, 200);
curveVertex(172, 200);
curveVertex(188, 216);
curveVertex(210, 216);
curveVertex(227, 200);
curveVertex(227, 200);
endShape();
stroke(0);
strokeWeight(2);
fill(255);
rect(187, 206, 7, 11);
rect(195, 207, 7, 13);
rect(203, 207, 7, 13);
rect(211, 206, 7, 11);
}
function Papyrus() {
//skull
fill(0);
rect(205, 185, 32, 80);
noStroke();
fill(255);
ellipse(201, 165, 60, 60);
ellipse(199, 185, 42, 35);
rect(224, 198, 4, 50);
beginShape();
vertex(222, 215);
vertex(226, 225);
vertex(226, 224);
vertex(217, 235);
vertex(182, 235);
vertex(182, 225);
vertex(217, 224);
endShape(CLOSE);
//eye sockets
fill(0);
beginShape();
vertex(185, 175);
vertex(193, 175);
vertex(193, 160);
vertex(185, 150);
endShape(CLOSE);
rect(215, 168, 7, 15);
//nose?
rect(197, 189, 4, 10);
rect(200, 185, 4, 10);
rect(203, 190.5, 4, 7);
//eye lines
stroke(0);
strokeWeight(2);
line(180, 151, 185, 151);
line(193, 161, 196, 165);
line(184, 175, 191, 175);
line(208, 160, 223, 160);
line(210, 175, 220, 175);
//smile
fill(255);
rect(188, 202, 6, 9);
rect(195, 203, 8, 11);
rect(203, 203, 8, 11);
rect(210, 202, 6, 9);
rect(189, 221, 5, 5);
rect(194, 223, 5, 9);
rect(200, 223, 5, 9);
rect(206, 223, 5, 9);
rect(211, 221, 5, 5);
}
function pixelHeart() {
noStroke();
fill(255, 0, 0);
rect(189, 200, 6, 20);
rect(195, 203, 7, 27);
rect(202, 209, 7, 25);
rect(209, 203, 7, 27);
rect(215, 200, 6, 20);
}