private void makeTableCycle(double[] P1, double[] P2, double[] P3) {
		double T;
		double[] H, D, W;

		H = new double[n];
		D = new double[n];
		W = new double[n];

		for (int i = 0; i < n - 1; i++) {
			H[i] = P1[i + 1] - P1[i];
			W[i] = (P2[i + 1] - P2[i]) / H[i];
		}

		W[n - 1] = W[0];

		for (int i = 1; i < n - 1; i++)
			D[i] = 2 * (P1[i + 1] - P1[i - 1]);

		D[n - 1] = 2 * (H[n - 2] + H[0]);

		for (int i = 1; i <= n - 1; i++)
			P3[i] = W[i] - W[i - 1];
		W[1] = H[0];
		W[n - 2] = H[n - 2];
		W[n - 1] = D[n - 1];
		for (int i = 2; i < n - 2; i++)
			W[i] = 0;
		for (int i = 1; i < n - 1; i++) {
			T = H[i] / D[i];
			P3[i + 1] = P3[i + 1] - P3[i] * T;
			D[i + 1] = D[i + 1] - H[i] * T;
			W[i + 1] = W[i + 1] - W[i] * T;
		}

		W[0] = W[n - 1];
		P3[0] = P3[n - 1];

		for (int i = n - 3; i >= 0; i--) {
			T = H[i] / D[i + 1];
			P3[i] = P3[i] - P3[i + 1] * T;
			W[i] = W[i] - W[i + 1] * T;
		}
		T = P3[0] / W[0];
		P3[0] = T;
		P3[n - 1] = T;
		for (int i = 1; i < n - 1; i++)
			P3[i] = (P3[i] - W[i] * T) / D[i];
	}