CIRCLE

30/11/2017 etudiant 0

void setup(){size(640, 360);noSmooth();background(120,170,200);fill(300);}void draw(){if(mousePressed){stroke(200);}else{stroke(3);}ellipse(mouseX-1, mouseY, mouseX+2, mouseY);ellipse(mouseX, mouseY-1, mouseX, mouseY+2); fill(126);}

Code – Random pattern

30/11/2017 etudiant 0

void setup(){size(800,800);} void draw(){if (mousePressed){fill(random(0,255));} else {fill(random(0,255),0,200);}ellipse(mouseX,mouseY,80,80);}

Aucune image

Badminton

30/11/2017 etudiant 0

  void setup(){size(1500,1000);}void draw(){ //43delay(100);background(#382AAD);strokeWeight(4);stroke(255,0,0);line(pmouseX,pmouseY,mouseX,mouseY); line(pmouseX+20,pmouseY+20,mouseX+15,mouseY+15);line(pmouseX-20,pmouseY-20,mouseX-15,mouseY-15);ellipse(mouseX,mouseY,50,50);}

Confettis Numériques

30/11/2017 etudiant 0

tweet : void setup(){size(700,700);background(255);noCursor();}void draw(){if (mousePressed){fill(255);background(255);}else{}fill(random(50,255),random(50,255),random(50,255),random(255));noStroke();ellipse(mouseX,mouseY,random(10,100),random(10,100));}