living.picture
YaBB Newbies
Offline
Posts: 12
simple picture animation
Apr 27th , 2010, 7:58am
Hey folks, I have alittle problem, we had a task in university to make a little picture animation therefore we' ve copied a painting from kandinsky. void setup() { size(350, 505); background(50, 100, 95); //void draw() { fill(150, 137, 76); beginShape(); vertex(101, 382); vertex(165, 335); vertex(165, 458); vertex(101, 458); vertex(101, 382); endShape(); noStroke(); fill(0); beginShape(); vertex(165, 335); vertex(218, 368); vertex(185, 368); vertex(185, 382); vertex(232, 382); vertex(232, 405); vertex(180, 405); vertex(180, 427); vertex(222, 427); vertex(222, 458); vertex(165, 458); vertex(165, 335); endShape(); fill(111, 112, 114); beginShape(); vertex(28, 458); vertex(42, 458); vertex(42, 482); vertex(28, 482); vertex(28, 458); endShape(); beginShape(); vertex(292, 20); vertex(297, 20); vertex(297, 105); vertex(292, 105); vertex(292, 20); endShape(); fill(0); beginShape(); vertex(292, 20); vertex(297, 20); vertex(297, 105); vertex(292, 105); vertex(292, 20); endShape(); fill(150, 137, 76); beginShape(); vertex(297, 39); vertex(334, 39); vertex(334, 41); vertex(297, 41); vertex(297, 39); endShape(); fill(0); beginShape(); vertex(297, 50); vertex(319, 50); vertex(319, 60); vertex(297, 60); vertex(297, 50); endShape(); beginShape(); vertex(297, 100); vertex(328, 100); vertex(328, 105); vertex(297, 105); vertex(297, 100); endShape(); fill(144, 32, 28); beginShape(); vertex(165, 305); vertex(100, 305); vertex(100, 314); vertex(165, 314); vertex(165, 305); endShape(); fill(0); beginShape(); vertex(165, 289); vertex(73, 289); vertex(73, 294); vertex(165, 294); vertex(165, 289); endShape(); fill(180, 122,30); arc(165, 162, 150, 225, PI/2, PI*1.5); //linker halbkreis fill(175,130,130,220); arc(150, 213, 268, 238, 0, PI/2); //viertelkreis rechts unten fill(170, 180, 170, 220); arc(150, 213, 268, 238, TWO_PI-PI/2, TWO_PI);//viertelkreis rechts oben fill(255); ellipse(209, 162, 10, 10); //großer kreis fill(76,78,78); ellipse(200, 156, 4, 4); //kleiner kreis filter (BLUR, 1); } This is my version, now i have to do a simple animation... i want to make the objects move randomly within the size of the window. would be fine if someone can help me, i am know how to do it with one single ellipse but i am not sure about freeforms and arcs... greets