2D-Perlin
in
Programming Questions
•
1 year ago
Hello people,
I'm trying to use noise() to create a colormap but instead of "blobs" of color(/white) i get stripes and i can't really figure out why. As always help will be greatly appreciated.
Thanks,
FRid
I'm trying to use noise() to create a colormap but instead of "blobs" of color(/white) i get stripes and i can't really figure out why. As always help will be greatly appreciated.
Thanks,
FRid
- import processing.opengl.*;
float inc1 = 0;
float inc2 = 0;
float amount1 = random(0.005, 0.01);
float amount2 = random(0.005, 0.01);
color c;
int value1 = 0;
int value2 = 0;
void setup() {
size(800,500,OPENGL);
frameRate(60);
background(0);
println(amount1+" "+amount2);
}
void draw() {
for (int i=0;i<width;i=i+25) {
inc1 = (inc1+amount1)00;
for (int j=0;j<width;j=j+25) {
inc2 = (inc2+amount2)00;
//value1 = int(noise(inc1) * 127);
//value2 = int(noise(inc2) * 127);
value2 = int(noise(inc1, inc2) * 255);
//c = color(value1+value2);
c = color(value2);
stroke(0);
fill(c);
rect(i,j,25,500);
}
}
}
1