lundi 22 décembre 2014

Deterministic random noise generator from multiple 64-bit inputs?

I am trying to create a pseudo-random number generator in C# that produces the same output, given the same set of inputs. It needs to be fast, accept 64 bit numbers and, particularly important allow an arbitrary set of inputs. The output should be a double between [0 and 1}.


The inputs, for the most part will be a seed value that stays constant during the lifetime of the app, and one or more other numeric values, such as an x, y, z and w coordinate, which may themselves be of type int32, int64 or double.


I've tried adapting some other random number generators I found, but I keep getting massive problems with clumping, mainly due to the fact that I have no idea about the theory surrounding the topic, or the mathematical properties of prime numbers, which seem to play a factor.


I want to use this function for generating the random noise that will be used internally within a number of other algorithms, including my own, and standard algorithms such as Perlin noise, amongst others.


How should I go about this?





Aucun commentaire:

Enregistrer un commentaire