Closed Mamboleoo closed 5 years ago
Hey @Mamboleoo ! I think it's the intended behavior due to the bell curve distribution of the function, mentioned by Dan in this video, https://www.youtube.com/watch?v=YcdldZ1E9gU
Oh I see, so I guess I only have two solutions then.
@Mamboleoo if you want you could use noise as a speed instead of as a position ie use the noise to add something to both coordinates
there is a nice Open simplex noise library here. https://github.com/blindman67/SimplexNoiseJS Not as fast at the perlin noise, so map() might be a better choice. @shiffman did a great live show last week on simplex noise in Java but was good to see the difference between the two noise types.
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
Details about the bug:
Hey there, I'm currently playing with the noise function to make some demos and I noticed that whenever I call the
noise()
function it never returns a number close to 0.0 or 1.0. I'm making dots moving around the screen by multiplying the noise value by the width & height of the canvas.But as you can see on this screenshot, my dots are always gathering in the center of my screen.
You can access this live demo on CodePen. If you press on the window I'm switching from P5's native noise function to another one I found online and it's quite clear that the external algorithm is returning more extended values. https://codepen.io/Mamboleoo/pen/WmwOKe
I'm not 100% sure this is a proper 'bug' or the way P5's noise algorithm is supposed to work but in my case it doesn't really export nice results.
Thanks for your help! Louis