AcManager.Controls.OxyPlotGraphViewer.CatmullRomSplineHelper.CreateSpline C# (CSharp) Method

CreateSpline() static private method

static private CreateSpline ( IList points, double alpha, double tolerance ) : List
points IList
alpha double
tolerance double
return List
            internal static List<ScreenPoint> CreateSpline(IList<ScreenPoint> points, double alpha, double tolerance) {
                var screenPointList = new List<ScreenPoint>();
                if (points == null) return screenPointList;
                
                var count = points.Count;
                if (count < 2) {
                    screenPointList.AddRange(points);
                    return screenPointList;
                }
                    
                for (var i = 0; i < count - 1; ++i) {
                    Segment(screenPointList, points[i == 0 ? 0 : i - 1], points[i], points[i + 1], points[i == count - 2 ? i + 1 : i + 2], alpha,
                            tolerance);
                }

                return screenPointList;
            }

Same methods

OxyPlotGraphViewer.CatmullRomSplineHelper::CreateSpline ( List points, double alpha, double tolerance ) : List
OxyPlotGraphViewer.CatmullRomSplineHelper