-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-01-02 22:57, Antonio Roberts wrote: > Can anyone enlighten me on how you would use [part_info] together with > [color] to generate randomly coloured particles, with each particle > having a randomly generated colour? >
instead of connecting the 4th outlet of [part_info] directly to [color], use it to trigger the generation of 3 random values, and feed those to [color]. if you want the colors to be persistent (that is: a given particle will have the _same_ random colors in 2 consecutive render cycles), you might want to reset the random generator to a given "seed" for each render cycle. a good time and place to do that would be the bang from a [t a b] right before [part_info]. more interesting things could be acchieved by storing the "random" values in a table (of size partnum) and read those values, starting at 0 for each render cycle (again: derived from the trigger [part_info] receives) and incrementing the counter for each particle (derived from the output of [part_info]. fgamsdr IOhannes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8CvBkACgkQkX2Xpv6ydvSXuQCaAkhlkOIBaqesoAhU5TmfAT5v rk8An114sualmlFArR8knCh+d0MWz4CD =nTtU -----END PGP SIGNATURE-----
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list