MbHermit3D Hermite Curve
The MbHermit3D class is declared in the cur_hermit3d.h file.
The Hermite curve is a descendant of the MbPolyCurve3D curve. The curve is described by a set of control points SArray<MbCartPoint3D> pointList, a set of curve derivatives at the control points SArray <MbVector3D> vectorList, a set of curve parameter values at the control points tList, the number splinesCount of Hermite cubic splines, and a curve periodicity flag closed. The curve also has some additional data that is optional and serves to accelerate the curve methods.
The Hermite curve at the parameter value tList[i], i = 0, 1, …, splinesCount, passes through the control point pointList[i] and has the derivative vectorList[i] at that point. The curve is constructed from splinesCount third-degree Hermite splines that are smoothly joined together. Each cubic Hermite spline describes a curve segment between two adjacent control points. Each cubic Hermite spline is defined by two endpoints and two curve derivatives at these points.
When computing the radius vector of a point on the Hermite curve, the index i of the working segment (the number of the cubic Hermite spline) is first determined from the curve parameter value t under the condition tList[i] ≤ t ≤ tList[i+1]. The curve radius vector is computed as the radius vector of the found segment for its local parameter w, which is determined from tList[i] and tList[i+1].
In the PointOn( double & t, MbCartPoint3D & r ) method, the curve radius vector r is described by the vector function of the found segment for its local parameter w:
where
and tList[i] ≤ t ≤ tList[i+1].
The Hermite curve is shown in the figure:
The curve parameter t takes values on the interval tmin ≤ t ≤ tmax, where tmin = tList[0], tmax = tList[splinesCount]. The curve can be periodic.
The curve shape depends on the arrangement of the control points, on the curve derivatives at the control points, and on the set tList of parameter values at the control points. When constructing the curve from control points only, the curve parameter values at the control points tList[i] (i = 0, 1, …, splinesCount) vary proportionally to the distance between points, and the derivatives vectorList[i] (i = 1, 2, …, splinesCount-1 ) are computed by constructing a parabola passing through three adjacent points pointList[i-1], pointList[i], pointList[i+1] at the corresponding parameter values tList[i−1], tList[i], tList[i+1] and computing the parabola derivative at the middle point.