weblog of 7. semester at AHO Interactiondesign


Thursday, September 07, 2006

Translate function

Today Daniel learned me some nifty actions:

void setup() {
size(1000,1000);
background(255);
noStroke();
smooth();
fly();
translate(600,0);
fly();
translate(0,600);
fly();
translate(-600,0);
fly();
translate(300,-300);
fly();
}

void fly() {
//finne
fill(10,80,161);
ellipse(200,155,8,30);

//vinger
fill(10,80,161);
ellipse(125,196,136,9);
ellipse(275,196,136,9);

//hode
fill(255,255,0);
ellipse(200,172,25,25);


//flykropp
fill(10,80,161);
ellipse(200,200,48,48);

//propell
fill(10,80,161,30);
ellipse(200,200,75,75);

//propellfront
fill(51,160,44);
ellipse(200,200,10,10);
}

No comments: