0
$\begingroup$

As programmer i find many solutions that generates pseudo-random values and surfaces, i'm always wondering how they can do that from a mathematical viewpoint.

For example i can generate a terrain from algorithms, i can input some parameters like the bottom and maximum height of the terrain and a seed to get the terrain that i want; i can't understand that from a mathematical viewpoint, if someone would explain this to me it would be great.

  • 0
    what is a terrain?2012-09-12

1 Answers 1

1

A pseudorandom number generator (PRNG) is a function that takes a seed and outputs a long sequence of seemingly random numbers. The algorithms you mention use a large quantity of random numbers to run. Using a PRNG, instead of specifying all of them, it is enough to specify a seed. In other words, a PRNG is a way of parametrizing a large number of random-looking sequences of numbers.

  • 0
    For anyone who's reading this, don't use the PRNG $x_{n+1} = ax_n + b \pmod{m}$, your programs might produce the wrong results!2012-09-14