Particle generator done as hw2 in CSCE 649 "Physically Based Modeling" (Fall 2012)