Processing Forum
I can use a two 1-dimensional arrays to store the particle locations. The array index (i, j) will indicated a single particle. At each call of draw(), each visible particle is moved in the specified direction by a small amount and drawn there. Also, new particle(s) are created. Once a particle flows off the opposite edge, it can be re-used.
and based on the question, my constraints for the design are: