// Illusion // Auteur : Jimmy Roussel // 25 Novembre 2007 : création int p = 24; int n = 32; color c1= color(245,245,245); color c2 = color(10,10,10); void setup() { size(600,600); translate(width/2, height/2); background(150);//fond gris strokeWeight(10); point(0,0); roue(p,1,c1,c2); roue(n,-1,c2,c1); } void roue(int nombre, int s, color couleur1, color couleur2){ float xA,yA,xB,yB,xC,yC,xD,yD; xA=8*nombre*cos(PI/(2*nombre)); yA=-8*nombre*sin(PI/(2*nombre)); xB=xA; yB=-yA; xC=1.1*xB; yC=1.1*yB+s*0.5*(yB-yA); xD=xC; yD=yC+yA-yB; pushMatrix(); // translate(width/2,height/2);//origine du repère au centre du croquis for (int i=0;i