Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. void setup()
  2. {
  3.   size(800, 600);
  4.  
  5.   stroke(255);
  6. }
  7.  
  8. //int flottement = 0;
  9. int nombreparticules = 40;
  10.  
  11. void draw() {
  12.   int paddingx = width/(nombreparticules+1);
  13.   int paddingy = height/(nombreparticules+1);
  14.   //int taillegrille = 40;
  15.  
  16.   background(0);
  17.  
  18.   for (int i = 0; i<nombreparticules+1; i++) {
  19.     for (int j = 0; j<nombreparticules+1; j++) {
  20.       point(paddingx+random(mouseX)+i*paddingx-mouseX/2,paddingy+random(mouseX)+j*paddingy-mouseX/2);
  21.     }
  22.   }
  23. }
  24.  
  25. //void keyPressed() {
  26. //  if (key == 'a') {
  27. //   flottement+=1;
  28. //  }else{
  29. //   flottement=0;
  30. //  }
  31. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement