issue #5685: refactor create functions of ParticleExamples
Merge pull request #1987 from joshuastray/use_new_in_sample

issue #5685: refactor create functions of ParticleExamples