issue #5685: refactor create functions of ParticleExamples