Trapped particles and harmonic generation