// private IParametrizedCurve BuildNewCurve(IParametrizedCurve currentCurve, IList<double> xCurveCorrection, IList<double> yCurveCorrection)
        // {
        //     var xChebishevpolinom = new ChebishevPolinomOld(xCurveCorrection);
        //     var yChebishevpolinom = new ChebishevPolinomOld(yCurveCorrection);
        //     double[] points = IntegralEquationDiscretezer.GetDiscretePoints(_state.PointsNumber);
        //     double[] newXValues = new double[points.Length];
        //     double[] newYValues = new double[points.Length];
        //     for (int i = 0; i<points.Length; i++)
        //     {
        //         newXValues[i] = _state.InnerCurve.GetX(points[i]) + xChebishevpolinom.Value(points[i]);
        //         newYValues[i] = _state.InnerCurve.GetY(points[i]) + yChebishevpolinom.Value(points[i]);
        //     }
        //     return new ApproxParametrizedCurve(
        //         new TrigonPolinom(newXValues, newXValues.Length / 2),
        //         new TrigonPolinom(newYValues, newYValues.Length / 2));
        //}

        private double[] GetCurveValues(IParametrizedCurve curve, double[] points, bool onX)
        {
            double[] values = new double[_state.PointsNumber];
            for (int i = 0; i < values.Length; i++)
            {
                values[i] = onX ? curve.GetX(points[i]) : curve.GetY(points[i]);
            }
            return(values);
        }
        private double FundamentalSolution(double t)
        {
            Point x = new Point(_outerCurve.GetX(t), _outerCurve.GetY(t));

            return(FundamentalSolution(x));
        }