algorithmic modeling for Rhino
Since Daniel Piker complained that the pseudo number random engine in GH1 is not random enough (http://www.grasshopper3d.com/forum/topics/random-numbers-aren-t), I figured I'll try some other algorithms to see if it makes sense to add them to GH2.
All images use the same seeds as Daniel's original post for x, y and z. As you can see only the Mersenne Twister and the Parallel Additive Lagged Fibonacci generators manage to not show the pattern. I certainly didn't expect them all to generate points on the same planes.
Mersenne seems to result in a smoother distribution than Palf, but that's just me eye-balling a single test case.
Instead of adding all of the above, I think it makes far more sense to only add the Mersenne Twister and then a bunch of algorithms that do *not* attempt to generate an equal distribution.
Tags:
Comment
Why not use the temperature of CPU to generate random numbers?
Is it somehow proven that both Mersenne twister and Palf won't have any eye-catching oddities ? It would be a pity for you to develop those methods and then learn that seeds like 7,11,13 can produce some "regularities".
@Dale, especially the first one is interesting. Providing different distributions is probably quite useful. I've also been planning to provide a random number generator that tries to avoid two values being very close together. This is of course hardly random any more, but it's the sort of algorithm used in the Populate components.
Hi David,
These might be worth reviewing:
http://www.codeproject.com/Articles/28548/Pitfalls-in-Random-Number...
http://www.codeproject.com/Articles/25172/Simple-Random-Number-Gene...
-- D
Whenever the seed values increase in a fixed fashion, the pattern emerges. Basically if (SeedX - SeedY) = (SeedY - SeedZ) the points end up on planes. By swapping out the x, y and zs the planes are oriented in different directions.
The plan is to provide several random number generators, however I don't see the point of providing a bunch of generators that basically result in very similar* outcomes.
* From a statistical point of view at least.
Hi , David
thanks for the solution,I also faced such problem with the following numbers couple of days ago :
218
214
200
or in some cases it really don't follow the congestive probability principals.
,but as a tiny plea , maybe its better to provide various types of pseudo-random as an option for random components.
Nope, it's just a quick test with some of the random generators available through Math.Net
Are you going to write this up for IEBFB?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!