I am stamping a set of 10 objects along a grid using:
rand($PT)*9
The only problem is the objects are not appearing as random as one would hope! :roll:
Is there something I can change in the expression to help out besides increasing the number of set objects piping into the switch?
ps. I am already using a sort sop to randomize the point numbers of the grid.
rand ... more random?
3290 3 2- Wren
- Member
- 527 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- the_squid
- Member
- 132 posts
- Joined: July 2005
- Offline
The rand() function isnt really random like Maya's. It will create a random result once but that random result will be the same until you change the seed. If you have several things you want to randomize, make sure each one has a different seed.
Example:
rand($PT*99.715)*1
rand($PT*71.223)*1
rand($PT*56.3354)*1
Example:
rand($PT*99.715)*1
rand($PT*71.223)*1
rand($PT*56.3354)*1
- JColdrick
- Member
- 4140 posts
- Joined: July 2005
- Offline
Maya has a truly random call? Are you just talking about non-deterministic generators like the Mersenne Twister, which is a better psuedo-random generator that will give you the same results when called in the same order?
I suspect Simon's answer will sort out Warren's needs, but it's worth noting that truly random number generation isn't of much use in the interactive package. The Twister is implemented, however, in VEX and VOPs - see the nrandom() call.
Cheers,
J.C.
I suspect Simon's answer will sort out Warren's needs, but it's worth noting that truly random number generation isn't of much use in the interactive package. The Twister is implemented, however, in VEX and VOPs - see the nrandom() call.
Cheers,
J.C.
John Coldrick
-
- Quick Links