.. role:: blue :class: blue MbHermit3D Hermite Curve ======================== .. _MbHermit3D_Hermite_Curve_: The :blue:`MbHermit3D` class is declared in the *cur_hermit3d.h* file. The Hermite curve is a descendant of the :blue:`MbPolyCurve3D` curve. The curve is described by a set of control points SArray\<:blue:`MbCartPoint3D`\> **pointList**, a set of curve derivatives at the control points SArray <:blue:`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 :blue:`PointOn`\ ( double & *t*, :ref:`MbCartPoint3D ` & **r** ) method, the curve radius vector **r** is described by the vector function of the found segment for its local parameter *w*: .. math:: :nowrap: \begin{equation} r(t) = ( 1 - 3 w^{2} + 2 w^{3} ) \mathbf{pointList}[i] + ( 3 w^{2} - 2 w^{3} ) \mathbf{pointList}[i + 1] + \\ \left( ( w - 2 w^{2} + w^{3} ) \mathbf{vectorList}[i] + ( - w^{2} + w^{3} ) \mathbf{vectorList}[i + 1] \right) \left( \mathit{tList}[i + 1] - \mathit{tList}[i] \right) \end{equation} where .. math:: w = \frac{t - \mathit{tList}[i] }{ \mathit{tList}[i + 1] - \mathit{tList}[i] }, and *tList[i]* ≤ *t* ≤ *tList[i+1]*. The Hermite curve is shown in the figure: .. _fig-hermite-curve_: .. figure:: /MODELER/CURVES/pictures/O.4.7.1.png :width: 15cm :align: center :name: fig-hermite-curve_ 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.