Documentation API of the 'edu.rit.numeric.CurveSmoothing' Java class
CurveSmoothing
edu.rit.numeric

Class 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:

    1. 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].
       
    2. 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:

      1. Zero curvature at the initial point; or
      2. 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:

      1. Zero curvature at the final point; or
      2. Final direction, specified as a straight line from u[n-1] to a coordinate uFinal.

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.