Friday, October 30, 2009

so wait, you want bugs IN your program?


Yay!
working with animation here!
What the code describes is an oval with six legs.
I want to make the legs move up and down first.
eventually, I want to make the bug move and shake while the legs "walk", but that's later.
after the code is a link to another help me thread. once I get something working at a satisfactory level, i'll post a video.

void setup(){
size (400, 400);
noFill();
smooth();
strokeWeight (1);
}
void draw(){
ellipse (100, 100, 50, 100);
legl(40, 90, 90);
legl(42, 110, 110);
legl(50, 130, 130);
legr(125, 100, 100);
legr(123, 120, 120);
legr(115, 140, 140);
frameRate (30);
}
void legl (int a, int b, int c) {
beginShape();
vertex (a+35, b + 10);
vertex (a+20, b);
vertex (a, c + 30);
endShape();
}
void legr (int d, int e, int f) {
beginShape();
vertex (d, e);
vertex (d+15, e - 10);
vertex (d+35, f + 20);
endShape();
}

http://processing.org/discourse/yabb2/YaBB.pl?num=1256882462/0#0

-END TRANS-

No comments:

Post a Comment