Experimeting with Perlin Noise
in
Programming Questions
•
1 year ago
Just curios,
I wrote 10 lines of code to see what Perlin noise is all about, got a pretty cool result but I don't really understand why this code is taking SO MUCH memory! after about 2 minutes of running it just freezes!
Here's my code:
I plan to use Perlin Noise for my artwork in the future but i don't think my computer can handle it if its so heavy, am i doing something wrong? is there a clever way around this?
Any help is much appreciated,
thanking you in advance,
--Mir
I wrote 10 lines of code to see what Perlin noise is all about, got a pretty cool result but I don't really understand why this code is taking SO MUCH memory! after about 2 minutes of running it just freezes!
Here's my code:
- float culr;
- float moveZ;
- void setup() {
- size(500,500);
- background(0);
- colorMode(HSB);
- }
- void draw(){
- for(int x = 0; x < width; x = x + 25) {
- for(int y = 0; y < height; y = y + 25) {
- culr = noise(x/100,y/100,moveZ)*360;
- fill(culr,360,360);
- rect(x+2.5,y+2.5,20,20);
- println(culr);
- }
- }
- moveZ+=0.01;
- }
I plan to use Perlin Noise for my artwork in the future but i don't think my computer can handle it if its so heavy, am i doing something wrong? is there a clever way around this?
Any help is much appreciated,
thanking you in advance,
--Mir
1