Showing posts with label ICM. Show all posts
Showing posts with label ICM. Show all posts

Sep 11, 2008

Help Make Mr. Piggy Smile


Here's my first bid of code in Processing, written for ICM. I'm having trouble with curves and arcs, so Mister Piggy is a pretty serious dude for now. Someday he will smile.

the pig: http://itp.nyu.edu/~jj891/ICM/week1/index.html

the code:
size(200,200);
background(0,0,255);
smooth();
rectMode(CENTER);
//piggy head
stroke(0);
fill(245,80,120);
ellipse(100,85,150,125);
//piggy nose
stroke(0);
fill(255,100,100);
ellipse(100,100,40,30);
//piggy nostrils
stroke(0);
fill(0);
ellipse(95,100,10,10);
ellipse(105,100,10,10);
//piggy eyes
stroke(0);
fill(255);
ellipse(70,70,30,20);
ellipse(130,70,30,20);
//piggy pupils
fill(0);
ellipse(70,75,7,7);
ellipse(130,75,7,7);
//piggy bow tie
fill(255,255,0);
stroke(0);
triangle(60,140,95,160,60,180);
triangle(140,140,105,160,140,180);
ellipse(100,160,20,15);
//piggy smile
//someday!