Perlin Noise for 1D?

江枫思渺然 提交于 2019-11-30 03:27:37

问题


Try as hard as I can, I cannot find any real tutorials on Perlin\Samplex Noise in 1D.

I've searched all around the internet but just cannot find anything. Any sites I do come across mentioning 1D perlin noise are usually very unclear or just shows the code


回答1:


I know this is an old question but here is one of the clearest explanations about the interpolation between fixed points that makes up 1d Perlin noise http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

One of the most important things to know, useful in all programming is the interpolation function...

http://paulbourke.net/miscellaneous/interpolation/

once you have random points with smoothstep interpolation, you have a kind of smooth 1d noise function.

see smoothstep on wiki. a lot of on the topic via google. https://en.wikipedia.org/wiki/Smoothstep

apparently the hyperlink is unstable, here it is again:

Simplex noise demystified

Ken Perlin presented “simplex noise”, a replacement for his classic noise algorithm. Classic “Perlin noise” won him an academy award and has become an ubiquitous procedural primitive for computer graphics over the years, but in hindsight it has quite a few limitations. Ken Perlin himself designed simplex noise specifically to overcome those limitations, and he spent a lot of good thinking on it. Therefore, it is a better idea than his original algorithm.

A few of the more prominent advantages are:

• Simplex noise has a lower computational complexity and requires fewer multiplications.

• Simplex noise scales to higher dimensions (4D, 5D and up) with much less computational cost, the complexity is for dimensions instead of the of classic Noise.

• Simplex noise has no noticeable directional artifacts.

• Simplex noise has a well-defined and continuous gradient everywhere that can be computed quite cheaply.

• Simplex noise is easy to implement in hardware.

Sadly, even now in early 2005 very few people seem to understand simplex noise, and almost nobody uses it, which is why I wrote this. I will try to explain the algorithm a little more thoroughly than Ken Perlin had time to do in his course notes from Siggraph 2001 and 2002, and hopefully make it clear that it is not as difficult to grasp as it first seems. From what I’ve learned, what confuses people the most is the impenetrable nature of Ken Perlin’s reference implementation in Java. He presents very compact and uncommented code to demonstrate the principle, but that code is clearly not meant to be read as a tutorial. After a few attempts I gave up on the code and read his paper instead, which was a lot more clear.

Not crystal clear, though, as he presents the algorithm mostly in words and code snippets. I would have appreciated some graphs and figures and a few helpful equations, and that’s what I try to provide here, to make it easier for others to understand the greatness and beauty of simplex noise. I will also explain things in one and two dimensions first to make things easier to explain with graphs and images, and then move on to three and four dimensions. Classic noise In order to explain simplex noise, it is helpful to have a good understanding of classic Perlin noise. I have seen quite a few bad and misinformed explanations in this area, so to make sure that you have the necessary groundwork done, I will present classic Perlin noise first.

Perlin noise is a so-called gradient noise, which means that you set a pseudo-random gradient at regularly spaced points in space, and interpolate a smooth function between those points. To generate Perlin noise in one dimension, you associate a pseudo-random gradient (or slope) for the noise function with each integer coordinate, and set the function value at each integer coordinate to zero.

For a given point somewhere between two integer points, the value is interpolated between two values, namely the values that would have been the result if the closest linear slopes from the left and from the right had been extrapolated to the point in question. This interpolation is a smoothstep algo.




回答2:


I know this question is old and has already been answered, but couldn't you just take lines out of 2D Perlin noise, e.g. always use 0 for the x or y?



来源:https://stackoverflow.com/questions/8798771/perlin-noise-for-1d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!