SHARE
TWEET

Unicorn Fur

xeromino Oct 8th, 2013 676 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float xstart, xnoise, ynoise;
  2. color[] pal1 = {
  3.   #FAB116, #CD512F, #A93500, #62B5D3, #166E96
  4. };
  5. color col;
  6.  
  7. void setup() {
  8.   size(900, 600);
  9.   smooth();
  10.   background(50);
  11.   xstart = random(10);
  12.   xnoise = xstart;
  13.   ynoise = random(10);
  14.   for (int y=0;y<=height;y+=3) {
  15.     ynoise += 0.1;
  16.     xnoise = xstart;
  17.     for (int x=0;x<=width;x+=3) {
  18.       xnoise += 0.1;
  19.       col = pal1[int(random(5))];
  20.       drawPoint(x, y, noise(xnoise, ynoise), col);
  21.     }
  22.   }
  23. }
  24. void drawPoint(float x, float y, float noiseFactor, color _col) {
  25.   pushMatrix();
  26.   translate(x, y);
  27.   rotate(noiseFactor * radians(360));
  28.   strokeWeight(1);
  29.   stroke(_col, 200);
  30.   line(0, 0, 10, 0);
  31.   popMatrix();
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top