xxxxxxxxxx
78
// Connie Hu - N12157740
// Assignment 1 - FROG
// I intend to create a frog
let p5 = "Debug!"
let creativeCoding = "Accessible!"
function setup() {
createCanvas(500, 500);
}
function draw() {
background(220);
//head. An oval, not a circle because this is a frog.
stroke(0, 230, 0);
noStroke();
fill(152, 255, 140);
ellipse(250, 310, 400, 300);
//I want each eye to have 3 different sized circles. The eyes will look //in different directions. The frog will look a little bit crazy.
//eye parts (green)
stroke(0, 230, 0);
strokeWeight(20);
fill(152, 255, 140);
noStroke();
ellipse(140, 160, 160, 160);
ellipse(340, 160, 160, 160);
//eye (whites)
noStroke();
fill(255);
ellipse(140, 150, 110, 110);
ellipse(340, 150, 110, 110);
//eyes (black)
stroke(0);
fill(0);
ellipse(140, 150, 40, 40);
ellipse(350, 150, 40, 40);
// inner eye whites
fill(255);
noStroke();
ellipse(130, 165, 25, 25);
ellipse(360, 135, 25, 25);
//tongue!
//I do not know if there is a cleaner method, but to create the tongue, //I will make an ellipse and use a green square (cover up) to block out //the top of the ellipse above the mouth line. I resolved a problem //with a creative solution.
// I FOUND ARC()!!! So I'm commenting this out
// fill(255, 92, 92);
// noStroke();
// ellipse(290,355, 100, 130);
//mouth line
stroke(1);
strokeWeight(20);
line(100, 340, 400, 340);
//cover up
fill(152, 255, 140);
noStroke();
rect(210, 250, 130, 80);
fill(255, 92, 92);
arc(290, 350, 100, 150, 0, PI, CHORD);
//I created a very awesome frog (as intended)!
//The most useful portions of this weeks materials were the videos and //the example sloth code. I drew inspiration from the example code in //order to create my awesome frog.
//will save canvas as img
//save('DopeyFrog.png');
}