The original post is here.
Understanding how a particle system works is a solid base to create generative visual effects.
In this tutorial, you will find a basic particle system with simple logic to control the 100 particles our system will have on-screen each time.
The code has comments explaining the logic.