Zee Salman- Project- 03

sketch

//Zee Salman
//SECTION E
//fawziyas@andrew.cmu.edu
//PROJECT-03



function setup() {
    createCanvas(600, 400);
//     rectMode(CENTER);
}

function draw() {
    background("pink");

//head
	fill("black")
	ellipse(width/2, height * .67, 100, 150);
//body	
	ellipse(width/2, height * .5, 80, 100);
//tummy	
	fill("white")
	ellipse(width/2, height * .68, 82, 96);
//beak
	fill("orange")
	ellipse(width/2, height * .5, 10,14);
//eyes
	
	fill("white")
	ellipse(320, height * .47, 20,20);
	ellipse(290, height * .47, 20,20);
//pupils
	fill("red")
	ellipse(320, height * .47, 10,10);
	ellipse(290, height * .47, 10,10);
	
//goes up

	if (mouseX < 300) {
	
	
		width = width + 2


	}
	if(mouseX > 299){

		width = width - 2
	}
//goes down
	if (mouseY < 200){
		height = height +2
	}
	if (mouseY > 199){
		height = height - 2
	}



}


For this project I combined the two mouse feature to make the eyes move on way and the body move another so that when the mouse is positioned just right, it creats a pengiun.

Leave a Reply