particles code grabbed from http://wilvoss.com/samples/particles/index.html