“Split amount” in Thinking Particles
- October 1st, 2008
- Posted in News
- Write comment
I figured a way to implement the functionality of the ‘split amount’ PFlow operator in TP, and quite easily:
A transcription – like Bobo does, explaining his scripts, I find that very useful: A random value between 0 and 1 is created for each paricle in the old group, using the ‘per animation’ option in the random operator. Then, this value is piped to a threshold operator (‘inside’ enabled) which has the split ratio defined in it. If it is 0-0.5 for example, it will split 50% of the particles, etc. The output of the threshold is sent to a group operator, which sends the particles to the new group. Save a blackbox, drink a beer 😉
Hi Hristo,
I have a question, Does it gives exactly half of particles if i check in threshold by 0.5 ? I suppose the random numbers can be generated like this too for example
total particles = 6
random numb = 0.1,0.2,0,3,0,4,0,9 0,1
in this case threshlond will seperate 5 particles and 1 particles
But if the random num generates evenly distributed number then it can split by half.. Is this how random number works ? ? ?
It’s theoretically possible to get that result, but it’s very unlikely. If it actually does, count it as your lucky day and change the random seed 🙂
http://en.wikipedia.org/wiki/Stochastic_process
Yes, over long datasets the random generator gives even distribution.