# Generating random numbers

There are several types of noise, of which the most common coming to mind is a totally random noise. This is however not the most appropriate form of noise for all possible applications.

If we are diving into procedural generation, we want instead our noise routines to generate a good deterministic, high entropy and uniform noise. It's possible to use the functions rand and srand from the ANSI C library. Particular care needs to be taken to use a well defined seed for each procedural texture, and to reinitialize this seed before we regenerate the same texture. However, once we add multithreading, multiple threads may be calling these functions at the same time, so in practice we would be better off designing our own noise functions.

The idea is to write a simple function, which associates for each real a number which, in series, gives a high entropy visually for our output domain, and possibly at as many different scales as possible.