public double addRoot(Complex root) {
		ListIterator<Complex> i = (ListIterator<Complex>) roots.iterator();
		double colorFactor = 2 / rootBoundry;

		int closest = 0;
		double minDistance = 100;

		while (i.hasNext()) {
			int index = i.nextIndex();
			Complex c = (Complex) i.next();

			double dist = distance(root, c);
			if (dist < minDistance) {
				minDistance = dist;
				closest = index;
			}

			if (dist <= rootBoundry * 1.1) {
				double retVal = index + colorFactor * distance(root, c);
				return Math.min(roots.size() - 1, retVal);
			}
		}

		if (roots.size() < 200 && runtotal < 25) {
			roots.add(root);
			System.out.println("(" + runtotal + ") add root:" + roots.size());
		}

		if (doInverse) {
			return closest;
		} else {
			return roots.size() - 1;
		}
	}