This commit is contained in:
Miloslav Ciz 2023-12-16 20:32:58 +01:00
parent f850c6c59b
commit 3eaceb1bb7
23 changed files with 125 additions and 65 deletions

View file

@ -102,4 +102,12 @@ There are different types of noise characterized by their properties such as num
```
*1D fractal noise composed of 3 octaves*
*1D fractal noise composed of 3 octaves*
## Code
A super simple "poor man's noise" that can be of use sometimes is **coin flip noise** which works simply like this: start with value 0, in each step output current value and randomly change it by +1 or -1. It's basically a [random walk](random_walk.md), a next best thing to the simplest [white noise](white_noise.md), so watch out, it will only work for most basic things, generalizing to a 2D noise will be awkward, you won't know how high or low the values will actually go, also the frequency properties probably won't be ideal. { Not sure actually what spectrum to expect, have to check that out, TODO. ~drummyfish } You may at least try to play around with changing the value even by more than one using e.g. [normal probability distribution](normal_distribution.md).
TODO: code for the above, maybe even a one liner for white noise
TODO: actual Perlin noise etc., also some nice noise that's just adding some random sine waves in a fractal fashion, like a one line formula