Grasshopper

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.

Views: 847

Comment

You need to be a member of Grasshopper to add comments!

Comment by David Rutten on December 5, 2014 at 2:28am
Panhao, because you want to be able to generate the same random numbers over and over again.
Comment by panhao on December 5, 2014 at 1:19am

Why not use the temperature of CPU to generate random numbers?

Comment by Mateusz Zwierzycki on December 2, 2014 at 3:06pm

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".

Comment by David Rutten on December 2, 2014 at 2:03pm

@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.

Comment by Dale Fugier on December 2, 2014 at 10:29am
Comment by David Rutten on December 2, 2014 at 5:44am

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.

Comment by Amin Bahrami on December 2, 2014 at 12:43am

 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.

Comment by David Rutten on December 1, 2014 at 5:45am

Nope, it's just a quick test with some of the random generators available through Math.Net

Comment by Danny Boyes on December 1, 2014 at 5:17am

Are you going to write this up for IEBFB?

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service