Slightly improved particle attractor function