Saturday, January 30, 2016

Variables and Functions

I decided to really try and refresh my memory with this one through using not only a custom function, but a custom class as well. Granted, the custom class is fairly simple, as its only real purpose is so that I can add cats to a dynamic array list every time the mouse is pressed and released, but it's something, right?

Please see the code for more information. I also decided to post this one on my OpenProcessing account, so that way you don't need to copy and paste the code to see it in action.

I hope you like it! I really feel like I'm getting back into the swing of things now, which is great!

Paige Ruka

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

Hello, world!

Hey everyone, Paige here! This will be my process blog for CS 240, Visual Programming. Expect to see some pretty cool stuff here over the course of the semester!

Paige Ruka