generative modeling for Rhino
hi All,
To avoid accidental patterns cropping up in my wonderful creations :), is there a way to insert the current clock time into a random seed? or is there a better way of achieving more random number sequences in a VB script component?
Tags:
Permalink Reply by David Stasiuk on January 23, 2012 at 6:15am Not elegant (there's certainly an easier way to format this, you might explore the System.DateTime.Now space a bit more) but it works:
A = Format(System.DateTime.Now.Hour, "00") & Format(System.DateTime.Now.Minute, "00") & Format(System.DateTime.Now.Second, "00")

There will always be an underlying pattern to a list of random numbers. Deterministic computers cannot create truly random numbers. There are better pseudo-random generator algorithms out there though than the one shipped with the .NET framework.
Another approach would be to use a random number table and import it as data. You can then either use this table directly or use it as a starting point for a random number series.
I have found that it is very important to be able to generate the same random numbers upon request, so using a varying seed is probably not a good idea.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Added by David Stasiuk 6 Comments 14 Likes
Added by stefano 4 Comments 6 Likes
© 2013 Created by Scott Davidson.
Powered by