Guest User

reddit waves

a guest
Jun 29th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. int centerX = 0;
  2. int centerY = 0;
  3. int radiusX = 60;
  4. int radiusY = 60;
  5. float rotatie = 0;
  6.  
  7. void setup() {
  8.   size(800, 800);
  9.   smooth();
  10. }
  11.  
  12. void draw() {
  13.   background(255);
  14.  
  15.  
  16.  
  17.   for (int i = -50; i < width+50; i = i + 35) {
  18.  
  19.     for (int j = -50; j < width+50; j = j + 35) {
  20.      
  21.       pushMatrix();
  22.       translate(i, j);
  23.       rotate(rotatie+j*(mouseX*.000025)+i*(mouseX*.000025));
  24.      
  25.       strokeWeight(1);
  26.       stroke(0);
  27.       noFill();      
  28.       ellipse(centerX, centerY, radiusX, radiusY);
  29.      
  30.       noStroke();
  31.       fill(0);
  32.       ellipse(radiusX/2, 0, 8, 8);
  33.      
  34.       popMatrix();
  35.     }
  36.   }
  37.  
  38.   rotatie = rotatie + .1;
  39.   //println(rotatie);
  40. }
Add Comment
Please, Sign In to add comment