Skip to content

Instantly share code, notes, and snippets.

@cdr6934
Last active December 19, 2020 16:14
Show Gist options
  • Save cdr6934/995cb13b974306dee84dfd52066cbb92 to your computer and use it in GitHub Desktop.
Save cdr6934/995cb13b974306dee84dfd52066cbb92 to your computer and use it in GitHub Desktop.
Following noise field that looks over the entire spectrum
/*
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