generative modeling for Rhino
Tags: randomness
Permalink Reply by Luis Fraguada on July 1, 2009 at 2:32am
Pseudo-random numbers are chosen with equal probability from a finite set of numbers. The chosen numbers are not completely random because a definite mathematical algorithm is used to select them, but they are sufficiently random for practical purposes. The current implementation of the Random class is based on Donald E. Knuth's subtractive random number generator algorithm. For more information, see D. E. Knuth. "The Art of Computer Programming, volume 2: Seminumerical Algorithms". Addison-Wesley, Reading, MA, second edition, 1981.
Permalink Reply by Tobias Schwinn on July 1, 2009 at 10:16pm
Permalink Reply by Luis Fraguada on July 2, 2009 at 2:28am randomNumberX = (rndMax - (rndMin + 1)) * (randomClass.NextDouble() + rndMin)
randomNumberY = (rndMax - (rndMin + 1)) * (randomClass.NextDouble() + rndMin)
randomNumberZ = (rndMax - (rndMin + 1)) * (randomClass.NextDouble() + rndMin)
Dim pt As New On3dPoint(x + RandomNumberX, y + RandomNumberY, z + RandomNumberZ)
Permalink Reply by Tobias Schwinn on July 5, 2009 at 11:55am ' Reset the random-number generator and provide a seed value for subsequent calls To Rnd
Rnd (-1)
Randomize 2
For i = 0 To max
arrDbl(i) = Rnd
Next
For j = 0 To max Step 3
Call Rhino.AddPoint(Array(arrDbl(j), arrDbl(j + 1), arrDbl(j + 2)))
Next
Permalink Reply by Luis Fraguada on July 6, 2009 at 1:51am
Permalink Reply by Tobias Schwinn on July 20, 2009 at 9:50pm
Permalink Reply by Tobias Schwinn on July 26, 2009 at 8:30pm The current implementation of the Random class is based on Donald E. Knuth's subtractive random number generator algorithm. For more information, see D. E. Knuth. "The Art of Computer Programming, volume 2: Seminumerical Algorithms ". Addison-Wesley, Reading, MA, second edition, 1981.
© 2013 Created by Scott Davidson.
Powered by