I'm looking for a 2 or 3 parameters math formula with the following characteristics:
- Simple (the fewest amount of operations the better)
- Random output (non-periodic)
- Normalized (Meaning the output will never be outside a given range; doesn't matter the range since once I know the range I can just divide and add/subtract to get it into the 0 to 1 range I'm looking for)
- White noise (the more samples you get the more evenly distributed the outputs get across the range of possible output values, with no gaps or hotspots, to the extent permitted by the floating-point standard)
- Random all the way down (no gradual changes between output values even if the inputs are changed by the smallest amount the float standard will allow. I understand that given the nature of randomness, it is possible two output values might be close together once in a while, but that must only happen by coincidence, and not because of smoothness or periodicity)
- Uses only the operations listed bellow (but of course, any operations that can be done by a combination of the ones listed bellow are also allowed)
I need this because I need a good source of controllable randomness for some experiments I'm doing with Cycles material nodes in Blender. And since that is where the formula will be implemented, the only operations I have available are:
- Addition
- Subtraction
- Multiplication
- Division
- Power (X to the power of Y)
- Logarithm (I think it's X Log Y; I'm not very familiar with the logarithm operation, so I'm not 100% sure if that is enough to specify which type of logarithm it is; let me know if you need more information about it)
- Sine
- Cosine
- Tangent
- Arcsine
- Arccosine
- Arctangent (not Atan2, but that can be created by combining operations if necessary)
- Minimum (Returns the lowest of 2 numbers)
- Maximum (Returns the highest of 2 numbers)
- Round (Returns the closest round number to the input)
- Less-than (Returns 1 if X is less than Y, zero otherwise)
- Greater-than (Returns 1 if X is more than Y, zero otherwise)
- Modulo (Produces a sawtooth pattern of period Y; for positive X values it's in the 0 to Y range, and for negative values of X it's in the -Y to zero range)
- Absolute (strips the sign of the input value, makes it positive if it was negative, doesn't do anything if it's already positive)
There is no iteration nor looping functionality available (and of course, branching can only be done by calculating all the branches and then doing something like multiplying the results of the branches not meant to be taken by zero and then adding the results of all of them together).