/// <summary>
        /// A MeshThread object to calculate a piece of a rbf mesh
        /// </summary>
        /// <param name="surf">the surface rbf to get mesh from</param>
        /// <param name="rows">total # of rows</param>
        /// <param name="rowstart">rows value for this thread to start from</param>
        /// <param name="rowsend">rows value for this thread to go to</param>
        /// <param name="columns">total # of columns</param>
        /// <param name="deltax">usually something like maxX-minX (max[0] - min[0])</param>
        /// <param name="deltay">usually something like maxY-minY (max[1] - min[1])</param>
        /// <param name="min">the minimum used to calculate the deltas</param>
        /// <param name="doneEvent">your ManualResetEvent that will tell you when this is done</param>
        public MeshThread(SurfaceRBF surf, int rows, int rowstart, int rowsend, int columns, double deltax, double deltay, double[] min, List<double[]> edgepnts, ManualResetEvent doneEvent, shaper shpr1, shaper shpr2)
        {
            if(shpr1 != null)
                    shaper1 = shpr1;
               else
                    shaper1 = ((double input) => { return input; }); // shapers undefined so return inputted value

               if(shpr2 != null)
                    shaper2 = shpr2;
               else
                    shaper2 = ((double input) => { return input; }); // shapers undefined so return inputted value

               _rowStart = rowstart;
               _rowsEnd = rowsend;
               _surf = surf;
               _deltax = deltax;
               _deltay = deltay;
               _columns = columns;
               _doneEvent = doneEvent;
               _min = min;
               _rowsTotal = rows;
               if (edgepnts != null)
               {
                    edgepnts.RemoveRange(0, edgepnts.Count - 9);// only use the slanted edge
                    _edge = new LeastSquares(edgepnts, 0, 0);
               }
        }
        /// <summary>
        /// A MeshThread object to calculate a piece of a rbf mesh
        /// </summary>
        /// <param name="surf">the surface rbf to get mesh from</param>
        /// <param name="rows">total # of rows</param>
        /// <param name="rowstart">rows value for this thread to start from</param>
        /// <param name="rowsend">rows value for this thread to go to</param>
        /// <param name="columns">total # of columns</param>
        /// <param name="deltax">usually something like maxX-minX (max[0] - min[0])</param>
        /// <param name="deltay">usually something like maxY-minY (max[1] - min[1])</param>
        /// <param name="min">the minimum used to calculate the deltas</param>
        /// <param name="doneEvent">your ManualResetEvent that will tell you when this is done</param>
        /// <param name="getCVT">bool to indicate if you want to calculate the surface rbf curvature value as well</param>
        public MeshThread(SurfaceRBF surf, int rows, int rowstart, int rowsend, int columns, double deltax, double deltay, double[] min, ManualResetEvent doneEvent, List<double[]> edgepnts, bool getCVT)
        {
            shaper1 = ((double input) => { return input; }); // shapers undefined so return inputted value
               shaper2 = ((double input) => { return input; }); // shapers undefined so return inputted value

               _rowStart = rowstart;
               _rowsEnd = rowsend;
               _surf = surf;
               _deltax = deltax;
               _deltay = deltay;
               _columns = columns;
               _doneEvent = doneEvent;
               _min = min;
               _rowsTotal = rows;
               _getCVT = getCVT;
               if (edgepnts != null)
               {
                    edgepnts.RemoveRange(0, edgepnts.Count - 9);
                    _edge = new LeastSquares(edgepnts, 0, 0);
               }
        }