We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Multiple collisions - Multiple Particle Systems
Page Index Toggle Pages: 1
Multiple collisions - Multiple Particle Systems (Read 361 times)
Multiple collisions - Multiple Particle Systems
Sep 18th, 2008, 2:11am
 
Hi all

Maybe someone can help me with this.  I'm modifying Daniel Shiffman's  "particlesplusforce" code (http://www.shiffman.net/itp/classes/nature/week05_s06/particlesplusforces/) - using his noc library and Vector 3D.  I start with a particle system that adds Red particles at the top of the canvas, which then fall under the influence of gravity.  The canvas is randomly seeded with Green Repellers.  If there is a collision between a Red particle and a Green repeller blue particles spew from the Green repeller site.  The Green Repellers are defined as a Class.  There is a "ghost" particle system located at each repeller site - and it is these systems that spew the blue particles.  So far so good.  After some travel under the influence of gravity, the blue particles themselves (they are my third particle system) spew Red particles.  Being Red particles I would like them to feel the repulsion of the Green seeded particles - But they do not.  I think this is because once a blue particle creates a red particle and then moves on, there is no particle system reference any longer.  Anyway, I would like to know if there is a way around this. [all particles move under the influence of gravity]


Thanks

M
Page Index Toggle Pages: 1