Esempio n. 1
0
 protected Spline(SurfaceDimension uDimension,
     SurfaceDimension vDimension,
     InterpolativeMathFunction interpolativeMathFunction,
     Derivation derivation = Derivation.Zero)
     : this(uDimension, vDimension,
         new DirectKnotsGenerator(interpolativeMathFunction), derivation)
 {
 }
 public BiquarticHermiteSpline(SurfaceDimension uDimension,
     SurfaceDimension vDimension,
     InterpolativeMathFunction interpolativeMathFunction,
     Derivation derivation = Derivation.Zero)
     : this(uDimension, vDimension,
         new DirectKnotsGenerator(interpolativeMathFunction), derivation)
 {
 }
        public MathFunctionSurface(SurfaceDimension uDimension,
            SurfaceDimension vDimension,
            MathFunction function, Derivation derivation = Derivation.Zero)
        {
            Derivation = derivation;
            if (derivation != Derivation.Zero)
            {
                var interpolativeFunction =
                    new InterpolativeMathFunction(function);
                switch (Derivation)
                {
                    case Derivation.X:
                        function = interpolativeFunction.Dx;
                        break;
                    case Derivation.Y:
                        function = interpolativeFunction.Dy;
                        break;
                    case Derivation.XY:
                        function = interpolativeFunction.Dxy;
                        break;
                    case Derivation.SecondXY:

                        function =
                            new InterpolativeMathFunction(
                                interpolativeFunction.Dxy).Dxy;
                        break;
                }
            }

            UDimension = uDimension;
            VDimension = vDimension;
            var uCount_min_1 = uDimension.KnotCount - 1;
                //surface.UKnotsCount-1;
            var vCount_min_1 = vDimension.KnotCount - 1;
                //surface.VKnotsCount-1;

            var segments = new List<ISurface>(uCount_min_1*vCount_min_1);

            for (var i = 0; i < uCount_min_1; i++)
            {
                for (var j = 0; j < vCount_min_1; j++)
                {
                    var segment = CreateSegment(i, j, function);
                    segments.Add(segment);
                }
            }
            Segments = segments;
        }
 public DeBoorKnotsGenerator(InterpolativeMathFunction function)
     : base(function)
 {
 }