def separation(self, r=<NUM_LIT:10>):
vx = vy = vz = <NUM_LIT:0><EOL>for b in self.boids:<EOL><INDENT>if b != self:<EOL><INDENT>if abs(self.x-b.x) < r: vx += (self.x-b.x)<EOL>if abs(self.y-b.y) < r: vy += (self.y-b.y)<EOL>if abs(self.z-b.z) < r: vz += (self.z-b.z)<EOL><DEDENT><DEDENT>return vx, vy, vz<EOL>
Boids keep a small distance from other boids.

        Ensures that boids don't collide into each other,
        in a smoothly accelerated motion.