public void interact(AbstractModel m) {
		for (Particle p : m.p) {
			if (p == this)
				continue;
			double dirX = -Math.signum(this.x - p.x);
			double dirY = -Math.signum(this.y - p.y);
			double dist = distance2(p);
			if (isImpact(dist, p.mass)) {
				this.impacting.add(p);
				continue;
			}
			dirX = p.mass * AbstractModel.gravitationalConstant * dirX / dist;
			dirY = p.mass * AbstractModel.gravitationalConstant * dirY / dist;
			assert this.speedX <= AbstractModel.lightSpeed : this.speedX;
			assert this.speedY <= AbstractModel.lightSpeed : this.speedY;
			double newSpeedX = this.speedX + dirX;
			newSpeedX /= (1 + (this.speedX * dirX) / AbstractModel.lightSpeed);
			double newSpeedY = this.speedY + dirY;
			newSpeedY /= (1 + (this.speedY * dirY) / AbstractModel.lightSpeed);
			if (!Double.isNaN(dirX)) {
				this.speedX = newSpeedX;
			}
			if (!Double.isNaN(dirY)) {
				this.speedY = newSpeedY;
			}
		}
	}