Refine your Program Part 2



Unit 1: Progress

 32%

Simple Program Example Backup

 

Copy and Paste the code below into your processing

function setup() {     //drawing size

  createCanvas(400, 400);

}



//-------------------------------------

 

function draw() {      //this is where the drawing goes

  

  background(220);    //background color

  

  fill("white");

  ellipse(230,200,50,50);      //left eyeball

  

  fill("black");              //fill color black

  ellipse(230,200,25,25);      //left pupil

  

  fill("white");

  ellipse(300,200,50,50);      //right eyeball

  

  fill("black");              //fill color black

  ellipse(300,200,25,25);      //right pupil

 

  rect(250,300,50,50);    //mouth

  

  

  fill("red");              //fill color red

  

  rect(260,339,25,25);    //mouth

  

  line(300,100,300,200);

  

  

}

 

Previous Next