Thursday, January 21, 2016

Simple Static Scene

It's not really a scene, but at least it's a cat! This is a good refresher for me, as I've used Processing in the past but needed to look back to remember what I'd learned. (If you're curious, you can find some of my previous work with Processing by clicking here!) Without further ado, here is my first creation for the new year:


int triX = 400;
int triY = 110; 
size(800, 600);
background(245); 
//EARS
fill(255,193,193);
triangle(triX, triY, triX-250, triY-50, triX-200, triY+190);
triangle(triX, triY, triX+250, triY-50, triX+200, triY+190); 
//HEAD
fill(139,69,19);
ellipse(width/2, height/2, 400, 400); 
//LEFT EYE
pushMatrix();
translate(width/2-95, height/2-25);
rotate(radians(-10));
fill(255,193,37);
ellipse(0, 0, 125, 75);
fill(0);
ellipse(0, 0, 60, 75);
popMatrix(); 
//RIGHT EYE
pushMatrix();
translate(width/2+95, height/2-25);
rotate(radians(10));
fill(255,193,37);
ellipse(0, 0, 125, 75);
fill(0);
ellipse(0, 0, 60, 75);
popMatrix(); 
//NOSE
fill(255,193,193);
quad(width/2-15,300,width/2+15,300,width/2+25,350,width/2-25,350);
arc(width/2,301,30,30,radians(-180),radians(0));
arc(width/2,350,50,50,radians(0),radians(180)); 
//MOUTH
strokeWeight(2.5);
arc(width/2,382,35,175,radians(0),radians(180));
fill(139,69,19);
arc(width/2-50,380,100,75,radians(0),radians(180));
arc(width/2+50,380,100,75,radians(0),radians(180)); 
//WHISKERS
line(width/2-150,350,75,300);
line(width/2-140,365,70,380);
line(width/2-150,380,80,450);
line(width/2+150,350,width-75,300);
line(width/2+140,365,width-70,380);
line(width/2+150,380,width-80,450); 
//TEXT
fill(0);
textAlign(CENTER);
textSize(30);
text("It's a cat!",width/2,height-50);

Paige Ruka

No comments:

Post a Comment