public void interpolate(int[] /* fc_point */f0_base[], int p0, int pn,
			PointPlotter plotter, double res) {
		double k1, k2;

		// Set up points for first curve segment.
		int p1 = p0;
		++p1;
		int p2 = p1;
		++p2;
		int p3 = p2;
		++p3;

		// Draw each curve segment.
		for (; p2 != pn; ++p0, ++p1, ++p2, ++p3) {
			// p1 and p2 equal; single point.
			if (x(f0_base, p1) == x(f0_base, p2)) {
				continue;
			}
			// Both end points repeated; straight line.
			if (x(f0_base, p0) == x(f0_base, p1)
					&& x(f0_base, p2) == x(f0_base, p3)) {
				k1 = k2 = (y(f0_base, p2) - y(f0_base, p1))
						/ (x(f0_base, p2) - x(f0_base, p1));
			}
			// p0 and p1 equal; use f''(x1) = 0.
			else if (x(f0_base, p0) == x(f0_base, p1)) {
				k2 = (y(f0_base, p3) - y(f0_base, p1))
						/ (x(f0_base, p3) - x(f0_base, p1));
				k1 = (3 * (y(f0_base, p2) - y(f0_base, p1))
						/ (x(f0_base, p2) - x(f0_base, p1)) - k2) / 2;
			}
			// p2 and p3 equal; use f''(x2) = 0.
			else if (x(f0_base, p2) == x(f0_base, p3)) {
				k1 = (y(f0_base, p2) - y(f0_base, p0))
						/ (x(f0_base, p2) - x(f0_base, p0));
				k2 = (3 * (y(f0_base, p2) - y(f0_base, p1))
						/ (x(f0_base, p2) - x(f0_base, p1)) - k1) / 2;
			}
			// Normal curve.
			else {
				k1 = (y(f0_base, p2) - y(f0_base, p0))
						/ (x(f0_base, p2) - x(f0_base, p0));
				k2 = (y(f0_base, p3) - y(f0_base, p1))
						/ (x(f0_base, p3) - x(f0_base, p1));
			}

			if (SPLINE_BRUTE_FORCE) {
				interpolate_brute_force(x(f0_base, p1), y(f0_base, p1), x(
						f0_base, p2), y(f0_base, p2), k1, k2, plotter, res);
			} else {
				interpolate_forward_difference(x(f0_base, p1), y(f0_base, p1),
						x(f0_base, p2), y(f0_base, p2), k1, k2, plotter, res);
			}
		}
	}