Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float xstart, xnoise, ynoise;
- color[] pal1 = {
- #FAB116, #CD512F, #A93500, #62B5D3, #166E96
- };
- color col;
- void setup() {
- size(900, 600);
- smooth();
- background(50);
- xstart = random(10);
- xnoise = xstart;
- ynoise = random(10);
- for (int y=0;y<=height;y+=3) {
- ynoise += 0.1;
- xnoise = xstart;
- for (int x=0;x<=width;x+=3) {
- xnoise += 0.1;
- col = pal1[int(random(5))];
- drawPoint(x, y, noise(xnoise, ynoise), col);
- }
- }
- }
- void drawPoint(float x, float y, float noiseFactor, color _col) {
- pushMatrix();
- translate(x, y);
- rotate(noiseFactor * radians(360));
- strokeWeight(1);
- stroke(_col, 200);
- line(0, 0, 10, 0);
- popMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement