3.6.13 Animation bei Processing
3.6.13 (EN google-translate)
3.6.13 (PL google-translate)
Als Beispiel soll ein roter Kreis auf einer Kreisbahn gleiten. Eine Umdrehung soll er in 10 Sekunden schaffen.

Bild 3.6.13-1: Screenshot des Processing-Fensters.
float phi=0.0; float x=0.0; float y=0.0; void setup() { size(500,500); frameRate(36); } void draw() { x = 250.0+200.0*cos(phi); y = 250.0+200.0*sin(phi); background(0,0,255); stroke(0,0,0); noFill(); ellipse(250,250,400,400); fill(255,0,0); noStroke(); ellipse((int)x,(int)y,100,100); phi+=(2.0*PI)/360.0; }
Code 3.6.13-1: Animation eines reoten Kreises.