How to: Draw Cardinal Splines
A cardinal spline is a curve that passes smoothly through a given set of points. To draw a cardinal spline, create a Graphics object and pass the address of an array of points to the DrawCurve method.
Drawing a BellShaped Cardinal Spline

The following example draws a bellshaped cardinal spline that passes through five designated points. The following illustration shows the curve and five points.
Drawing a Closed Cardinal Spline

Use the DrawClosedCurve method of the Graphics class to draw a closed cardinal spline. In a closed cardinal spline, the curve continues through the last point in the array and connects with the first point in the array. The following example draws a closed cardinal spline that passes through six designated points. The following illustration shows the closed spline along with the six points.
Changing the Bend of a Cardinal Spline

Change the way a cardinal spline bends by passing a tension argument to the DrawCurve method. The following example draws three cardinal splines that pass through the same set of points. The following illustration shows the three splines along with their tension values. Note that when the tension is 0, the points are connected by straight lines.
The preceding examples are designed for use with Windows Forms, and they require PaintEventArgs e, which is a parameter of the Paint event handler.