/* fonctionne comme un bras articulŽ ou un MClip qui contiend un MClip qui contiend un MClip */ void setup() { size(300,300); framerate(100); smooth(); background(51); } float angle=0; float jitter; float rad = radians(angle); void draw() { rectMode(CORNER); noStroke(); fill(51, 1); rect(0, 0, width, height ); jitter = 1.; angle += jitter; rad = radians(angle); fill(random(255),random(255),random(255),32); translate(width/2, height/2); rotate(rad); stroke(255,255,255,32); rectMode(CENTER); rect(0, 0, 100, 100); pushMatrix(); // enregistre les coordonnŽes fill(255); translate(width/4, height/4); rect(0, 0, 10, 10); rotate(rad); ellipseMode(CENTER); fill(255,128,128,32); ellipse(10, 10, 20, 20); fill(255,255,255,32); ellipse(30, 30, 10, 10); popMatrix(); // restitue les coordonnŽes rect(0, 0, 20, 20); }