Code Art

This is my code art! With the use of processing, I was able to code these self portraits of myself.


CodeArt2

function setup() {
createCanvas(600, 600);
}
function draw() {
background(400, 300, 30);
noStroke();
//body
fill(0);
rect(200, 440, 200, 200, 20);
fill(250);
rect(231,445,140,200,20);
//neck
fill(260, 210, 175);
rect(277, 380, 45, 75, 40);
//Head
fill(260, 210, 175);
ellipse(300, 300, 200, 220);
//hair
fill(0);
triangle(202, 290, 200, 175, 300, 175);
triangle(400, 290, 390, 175, 300, 175);
triangle(300, 290, 310, 175, 220, 175);
triangle(260, 290, 300, 175, 220, 175);
fill(060,0,0,400);
triangle(230, 290, 270, 175, 220, 175);
triangle(360, 290, 350, 175, 300, 175);
triangle(380, 290, 370, 175, 330, 175);
triangle(320, 290, 320, 175, 260, 175);
triangle(330, 290, 330, 175, 290, 175);
triangle(360, 290, 365, 175, 340, 175);
fill(260, 210, 175);
rect(245, 260, 090, 40);
fill(0);
triangle(202, 290, 200, 200, 220, 200);
triangle(400, 290, 390, 200, 380, 200);
fill(250);
ellipse(350, 325, 45, 28);
ellipse(260, 325, 45, 28);
//face
fill(0);
ellipse(350, 325, 20, 20);
ellipse(260,325,20,20);
fill(250);
ellipse(353,320,10,10);
ellipse(258,320,10,10);
fill(250);
arc(305,360,45,35,0,180);
fill(260, 210, 175);
quad(280,360,340,360,300,325,420);
//eyebrows
fill(0);
rect(245,300,040,010,10);
rect(335,300,040,010,10);
//pocket
fill(0)
rect(320,490,30,30);
arc(335,520,30,20,0,180);
//nose//
fill(280, 190, 175);
quad(295,350,315,350,305,325,220);
}


CodeArt1

function setup() {
createCanvas(600,600);
}
function draw() {
fill(0);
fill(260,210,175);
ellipse(300,300,200,200);
fill(0);
rect(200,200,200,100);
fill(250);
ellipse(350,325,40,40);
ellipse(260,325,40,40);
fill(0);
ellipse(350,325,15,15);
ellipse(260,325,15,15);
fill(250);
ellipse(305,350,30,20);
}