proce55or

Hypnotic circles

Feb 14th, 2014
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.09 KB | None | 0 0
  1. float myNoise = 0;
  2.  
  3. void setup() {
  4.  
  5.   size(600, 600);
  6. }
  7.  
  8. void draw() {
  9.  
  10.   background(255);
  11.  
  12.   circle(50, 0.001, 40, 100, 200);
  13.   circle(100, 0.002, 80, 10, 200);
  14.   circle(150, 0.003, 120, 100, 10);
  15.   circle(200, 0.004, 160, 10, 200);
  16.   circle(250, 0.005, 200, 200, 80);
  17.   circle(300, 0.006, 245, 100, 90);
  18.   circle(350, 0.006, 100, 150, 10);
  19.   circle(400, 0.007, 190, 100, 200);
  20.   circle(450, 0.008, 10, 255, 90);
  21.   circle(500, 0.007, 50, 90, 200);
  22.   circle(550, 0.006, 255, 140, 100);
  23.   circle(600, 0.005, 110, 10, 110);
  24.   circle(700, 0.004, 180, 180, 20);
  25.   circle(800, 0.003, 50, 50, 200);
  26.   circle(900, 0.002, 170, 70, 255);
  27.   myNoise++;
  28. }
  29.  
  30.  
  31. void circle(int ellipseSize, float factor, int circleFillA, int circleFillB, int circleFillC) {
  32.  
  33.   float x = noise(myNoise * factor, ellipseSize) * ellipseSize;
  34.  
  35.  
  36.   noStroke();
  37.  
  38.   fill(
  39.   noise(1, myNoise * factor)*circleFillA,
  40.   noise(2, myNoise * factor)*circleFillB,
  41.   noise(3, myNoise * factor)*circleFillC, noise(4, myNoise * factor)*150);
  42.  
  43.   ellipseMode(CENTER);
  44.  
  45.   ellipse(width/2, height/2, x, x);
  46.  
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment