**'edu.rit.numeric.CurveSmoothing'**Java class

edu.rit.numeric

## Class CurveSmoothing

- java.lang.Object
- edu.rit.numeric.CurveSmoothing

public class CurveSmoothingextends Object

Class CurveSmoothing provides operations useful for creating smooth cubic spline curves.We are given a sequence of

*n*coordinate values,`u[0]`..`u[n-1]`. These may be either the X coordinates or the Y coordinates of a sequence of 2-D points. We wish to join successive pairs of points with a sequence of cubic Bezier curves to create an overall cubic spline curve. We need to know the X or Y coordinates of the two Bezier control points for each Bezier curve. The Bezier control point coordinates are designated by`a[i]`and`c[i]`, such that Bezier curve*i*is defined by`u[i]`,`a[i]`,`c[i]`, and`u[i+1]`in that order.There are several cases:

- The curve is closed (there is a Bezier curve from point
*n*-1 back to point 0). We need the*n*Bezier control points`a[0]`..`a[n-1]`and the*n*Bezier control points`c[0]`..`c[n-1]`. The first Bezier curve will be`u[0]--a[0]--c[0]--u[1]`, and the last Bezier curve will be`u[n-1]--a[n-1]--c[n-1]--u[0]`.

- The curve is open (there is no Bezier curve from point
*n*-1 back to point 0). We need the*n*-1 Bezier control points`a[0]`..`a[n-2]`and the*n*-1 Bezier control points`c[0]`..`c[n-2]`. The first Bezier curve will be`u[0]--a[0]--c[0]--u[1]`, and the last Bezier curve will be`u[n-2]--a[n-2]--c[n-2]--u[n-1]`.For the initial point

`u[0]`, an additional condition must be specified, either:- Zero curvature at the initial point; or
- Initial direction, specified as a straight line from a coordinate
`uInitial`to`u[0]`.

For the final point

`u[n-1]`, an additional condition must be specified, either:- Zero curvature at the final point; or
- Final direction, specified as a straight line from
`u[n-1]`to a coordinate`uFinal`.

- The curve is closed (there is a Bezier curve from point

**Warning:**You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.