public boolean isOutOfBound(short n, Dimension bound) {
		if (n < 0)
			throw new IllegalArgumentException("n<0");
		if (n >= path.length)
			throw new IllegalArgumentException("overflow");
		if (bound == null)
			return false;
		if (x[n] < -bound.width / 2 || x[n] > bound.width / 2 || y[n] < -bound.height / 2 || y[n] > bound.height / 2)
			return true;
		return false;
	}