Last active
December 19, 2020 16:14
-
-
Save cdr6934/995cb13b974306dee84dfd52066cbb92 to your computer and use it in GitHub Desktop.
Following noise field that looks over the entire spectrum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Programing: Noise Field | |
Name: @Generate.Collective | |
Color functions are tewmplates used by @manolode | |
*/ | |
/////////////////////////////////////////////////////////// | |
int move, n; | |
int len = 50; | |
float x, y, z, s, iter, deg_x, deg_y, na, num; | |
float noise_factor; | |
color a, b, col; | |
void setup() | |
{ | |
size(1000,1000, P3D); | |
background(255); | |
smooth(8); | |
noise_factor = 0.0000001; | |
n = 100; | |
a = getColor(); | |
b = getColor(); | |
} | |
void draw() { | |
background(255); | |
for(float x = width/n; x < width; x += width / n) | |
{ | |
for(float y = height/n; y < height; y += height / n) | |
{ | |
col = lerpColor(a,b,map(x*y,0,width*height,0,1)); | |
fill(col); | |
pushMatrix(); | |
translate(x,y); | |
rotate(noise(x*noise_factor,y*noise_factor)*TWO_PI); | |
rect(0,0, 5,map(noise(x*noise_factor,y*noise_factor), 0,1,0,len)); | |
popMatrix(); | |
} | |
} | |
noise_factor += 0.00001; | |
//saveImage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment