* 
	 * @param r0 the equilibrium length of the spring @param d the maximum displacement
	 */
	static Vector2D moveSpring(int x, int y, int xc, int yc, int r0, int d) {
		double r = Math.hypot(x - xc, y - yc);
		if (r > r0 + d) {
			double x1 = (r0 + d) * (x - xc) / r + xc;
			double y1 = (r0 + d) * (y - yc) / r + yc;
			return new Vector2D(x1, y1);
		} else if (r < r0 - d) {
			double x1 = (r0 - d) * (x - xc) / r + xc;
			double y1 = (r0 - d) * (y - yc) / r + yc;
			return new Vector2D(x1, y1);
		} else {
			return new Vector2D(x, y);
		}
	}