# 三次埃尔米特样条

三次埃尔米特样条是一种分段三次插值曲线或函数，它在每个节点处匹配给定的函数值和给定的一阶导数值，且其一阶导数在各节点处连续。每一段是由两端点处的四个数据——每端的函数值与导数值——唯一确定的三次多项式。这一构造以夏尔·埃尔米特（Charles Hermite，1822–1901）命名，他于1878年发表了一种通用方法，用于确定一个多项式，使其不仅在指定点处取给定值，而且在这些点处的前几阶导数也取给定值<sup>[1](https://imagescience.org/meijering/research/chronology/)</sup>。

| 关键事实 | 细节 |
|---|---|
| 定义 | 在节点处匹配函数值与一阶导数的分段三次插值器；结果为C1连续<sup>[2](https://docs.scipy.org/doc/scipy-1.15.2/reference/generated/scipy.interpolate.CubicHermiteSpline.html)</sup> |
| 每段数据 | 四个值：区间两端点处的位置与导数<sup>[3](https://cs.nyu.edu/~perlin/courses/spring2016/0405/)</sup> |
| 误差界 | 若在长度为 \(h_i\) 的区间上 \(\|f^{(4)}\| \le M_i\)，则 \(\|f(x)-H(x)\| \le (M_i/384)\,h_i^{4}\)<sup>[4](https://lemesurierb.people.charleston.edu/introduction-to-numerical-methods-and-analysis-python/docs/main/piecewise-polynomial-approximation-and-splines.html)</sup> |
| 光滑性权衡 | 节点处为C1连续，但一般不是C2连续；三次样条通过求解导数而非将导数作为输入，从而达到C2连续<sup>[5](https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_3.html)</sup> |
| 无需导数的近亲 | Catmull-Rom样条与基数样条是三次埃尔米特样条，其切线由相邻控制点计算得出<sup>[6](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dxvec3catmullrom)</sup><sup> • </sup><sup>[7](https://www.cubic.org/docs/hermite.htm)</sup> |
| 保形变体 | PCHIP选择斜率，使插值函数保持单调性且不超出数据范围<sup>[8](https://www.mathworks.com/help/matlab/ref/pchip.html)</sup> |
| 结构工程中的用途 | 埃尔米特三次形函数在欧拉-伯努利梁有限元中插值位移与转角，保证单元间的C1连续性<sup>[9](https://upcommons.upc.edu/bitstreams/0b8502a9-3a66-4185-9cc9-cb84fd23ab59/download)</sup> |

## 数学形式

在区间 \([t_i, t_{i+1}]\) 上，令 \(h_i = t_{i+1} - t_i\)，三次埃尔米特插值函数 \(H\) 满足四个条件：\(H(t_i) = y_i\)、\(H'(t_i) = y_i'\)、\(H(t_{i+1}) = y_{i+1}\)、\(H'(t_{i+1}) = y_{i+1}'\)。四个条件确定三次多项式的四个系数，因此该段存在且唯一<sup>[4](https://lemesurierb.people.charleston.edu/introduction-to-numerical-methods-and-analysis-python/docs/main/piecewise-polynomial-approximation-and-splines.html)</sup>。

书写该段的标准方式是将它表示为四个固定基多项式的加权和。在归一化参数 \(s \in [0,1]\) 下，设端点值为 \(v_1, v_2\)，端点切线为 \(t_1, t_2\)，

\[ Q(s) = (2s^{3} - 3s^{2} + 1)\,v_1 + (-2s^{3} + 3s^{2})\,v_2 + (s^{3} - 2s^{2} + s)\,t_1 + (s^{3} - s^{2})\,t_2 \]

这四个基多项式永不改变，因此三次多项式可表示为四个权重与一个固定矩阵的乘积，该矩阵常被称为埃尔米特矩阵<sup>[3](https://cs.nyu.edu/~perlin/courses/spring2016/0405/)</sup>。同样的构造适用于任意维数：对于三维曲线，只需对每个坐标分别套用公式<sup>[7](https://www.cubic.org/docs/hermite.htm)</sup>。

在舍恩伯格研究的基数（整数节点）情形下，对于值序列 \(c[k]\) 与导数序列 \(d[k]\)，三次埃尔米特样条用两个支撑集为 \([-1,1]\) 的生成函数写出：

\[ f_{\mathrm{Her}}(t) = \sum_{k \in \mathbb{Z}} c[k]\,\varphi_1(t-k) + d[k]\,\varphi_2(t-k) \]

其中在 \(0 \le \|t\| \le 1\) 上 \(\varphi_1(t) = (2\|t\|+1)(\|t\|-1)^{2}\)、\(\varphi_2(t) = t(\|t\|-1)^{2}\)，其余处为零。它们满足联合插值条件 \(\varphi_1(k) = \delta[k]\)、\(\varphi_2'(k) = \delta[k]\)、\(\varphi_1'(k) = 0\)、\(\varphi_2(k) = 0\)，且对于被多项式界定的序列，解存在且唯一<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC6919321/)</sup>。

## 精度

当插值函数逼近一个已知的光滑函数时，每个区间上的误差有局部界。记 \(M_i\) 为 \(\|f^{(4)}\|\) 在 \([t_i, t_{i+1}]\) 上的界，则

\[ \|f(x) - H(x)\| \le \frac{M_i}{384}\,h_i^{4} \]

这是四阶精度，与夹持三次样条大致相当。代价是埃尔米特插值函数的光滑性较低，在节点处只有一个连续导数，但误差是局部化的：若某个区间内四阶导数很大或不存在，精度只在该区间受损，而不会波及整个定义域<sup>[4](https://lemesurierb.people.charleston.edu/introduction-to-numerical-methods-and-analysis-python/docs/main/piecewise-polynomial-approximation-and-splines.html)</sup>。若节点处的导数 \(D_j\) 本身是近似值而非精确值，则导数估计的 \(O(h^{3})\) 精度足以在光滑区域保持插值的 \(O(h^{4})\) 精度<sup>[11](https://link.springer.com/article/10.1007/s10915-023-02191-9)</sup>。

## 与三次样条的关系

三次埃尔米特样条与三次样条都是穿过数据的分段三次多项式，且都在节点处具有连续的一阶导数。二者的区别在于二阶导数。三次样条是零阶、一阶、二阶导数均连续的分段三次多项式，且只使用函数值；它通过求解导数信息而非将导数作为输入来获得这种额外的光滑性<sup>[5](https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_3.html)</sup>。要求二阶导数连续，会在插值与一阶导数连续性已经施加的 \(3n-4\) 个约束之外再增加 \(n-2\) 个约束，剩下两个自由参数由边界条件确定<sup>[12](https://cse.engineering.nyu.edu/~mleung/CS4744/f03/Heath/chap07.pdf)</sup>。

实际后果是用户面临一个选择。MATLAB关于`pchip`的文档总结道：`spline`选择节点处的斜率使二阶导数连续，当数据来自光滑函数时产生更光滑、更精确的结果；而`pchip`在数据不光滑时没有过冲、振荡更少，且建立成本更低；二者的求值成本相同<sup>[8](https://www.mathworks.com/help/matlab/ref/pchip.html)</sup>。实际上，样条插值函数也是分段三次埃尔米特插值多项式，只是斜率不同<sup>[13](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/moler/interp.pdf)</sup>。

## 切线的选取

埃尔米特形式需要导数值，而原始数据通常并不提供<sup>[5](https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_3.html)</sup>。关于三次埃尔米特样条的实用文献，很大一部分是从数据计算切线的配方。

**基数样条与Catmull-Rom样条。** 基数样条是埃尔米特曲线的一个子集，其中节点处的切线由其相邻点计算：\(T_i = a\,(P_{i+1} - P_{i-1})\)，常数 \(a\) 控制曲线的松紧程度<sup>[7](https://www.cubic.org/docs/hermite.htm)</sup>。取 \(a = 0.5\) 即得Catmull-Rom样条，\(T_i = 0.5\,(P_{i+1} - P_{i-1})\)<sup>[7](https://www.cubic.org/docs/hermite.htm)</sup>。等价地，给定四个点 \((p_1, p_2, p_3, p_4)\)，Catmull-Rom样条由埃尔米特样条取 \(v_1 = p_2\)、\(v_2 = p_3\)、\(t_1 = (p_3 - p_1)/2\)、\(t_2 = (p_4 - p_2)/2\) 导出<sup>[6](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dxvec3catmullrom)</sup>。英特尔IPP库同样将Catmull-Rom样条描述为一种三次埃尔米特样条<sup>[14](https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2022-0/interpolation-with-two-parameter-cubic-filters.html)</sup>，ceres-solver库则指出这两个名称用于同一构造<sup>[15](https://github.com/ceres-solver/ceres-solver/blob/master/include/ceres/cubic_interpolation.h)</sup>。

**Kochanek-Bartels（TCB）样条。** 由D. Kochanek与R. Bartels于1984年提出，旨在让动画师对关键帧动画有更多控制。它们是埃尔米特曲线，其切线公式为每个关键帧暴露三个控制值：张力，控制曲线弯曲的急剧程度；连续性，控制速度与方向变化的快慢；偏置，控制曲线经过关键点时的方向。每个节点处分离的入切线与出切线允许有意制造导数间断，而涉及关键帧两侧帧数 \(N_{i-1}\) 与 \(N_i\) 的调整因子，可在关键帧间距不均匀时避免速度突变<sup>[7](https://www.cubic.org/docs/hermite.htm)</sup>。

**单调与保形选择。** PCHIP确定斜率 \(d_k\)，使函数值至少在局部不超出数据范围。若节点两侧的割线斜率 \(\delta_k\) 与 \(\delta_{k-1}\) 异号，或其中之一为零，则该节点为离散局部极值点，斜率置为 \(d_k = 0\)；所得插值函数在数据单调的区间上保持单调性，在数据有局部极值处保持局部极值<sup>[8](https://www.mathworks.com/help/matlab/ref/pchip.html)</sup><sup> • </sup><sup>[13](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/moler/interp.pdf)</sup>。这种保形插值函数的导数在断点处连续，但插值函数本身在断点处一般不可二阶微分，因此是C1连续的<sup>[16](https://math.iit.edu/~fass/Notes350_Ch3.pdf)</sup>。

## 应用

**关键帧动画与摄像机控制。** 埃尔米特曲线用于在关键点之间平滑插值，例如关键帧动画中的物体运动和摄像机路径。Kochanek-Bartels样条的TCB控制正是为此目的而设，已在Autodesk 3D Studio Max和Newtek Lightwave等软件包中实现<sup>[7](https://www.cubic.org/docs/hermite.htm)</sup>。艺术家和设计师往往觉得移动点来创建样条比处理导数更方便，这也是无需导数的Catmull-Rom形式在图形学中流行的原因之一；皮克斯的RenderMan在其曲线基中支持“hermite”和“catmull-rom”<sup>[3](https://cs.nyu.edu/~perlin/courses/spring2016/0405/)</sup><sup> • </sup><sup>[17](https://renderman.pixar.com/resources/rman26/classCurves.html)</sup>。

**有限元分析。** 在欧拉-伯努利梁单元中，横向位移与转角是两个节点自由度，位移场的三次埃尔米特插值保证相邻单元间的C1连续性，这是梁理论所要求的。四个埃尔米特形函数分别乘以单元位移场中的两个位移与两个转角<sup>[9](https://upcommons.upc.edu/bitstreams/0b8502a9-3a66-4185-9cc9-cb84fd23ab59/download)</sup>。Abaqus理论文档以同样的方式——区间两端的函数值与导数——写出埃尔米特三次式<sup>[18](https://abaqus.uclouvain.be/English/SIMACAETHERefMap/simathe-c-eulerbernbeams.htm)</sup>。

**轨道与轨迹工作。** 埃尔米特插值用于精确表示卫星轨道：在一项测高卫星轨道研究中，60秒步长上的7次埃尔米特插值给出的三维插值误差平均约为0.5至0.6毫米，且埃尔米特方法所需的支撑点少于同等精度的牛顿插值，同时在插值窗口边缘附近的误差更小<sup>[19](https://link.springer.com/article/10.1186/s40623-024-02102-8)</sup>。在轨迹优化中，分段三次埃尔米特插值多项式沿时间维使用，以保持单调性并减少数值振荡<sup>[20](https://doi.org/10.1016/j.actaastro.2026.05.056)</sup>，而埃尔米特-辛普森配点是低推力航天器轨迹的标准直接转录方法<sup>[21](https://onlinelibrary.wiley.com/doi/10.1155/2014/851720)</sup>。

**软件。** SciPy提供`CubicHermiteSpline(x, y, dydx)`，这是一个匹配函数值与一阶导数的分段三次插值器，表示为分段多项式对象；PCHIP与`CubicSpline`是同一软件包中无需导数和C2连续的替代方案<sup>[2](https://docs.scipy.org/doc/scipy-1.15.2/reference/generated/scipy.interpolate.CubicHermiteSpline.html)</sup>。

## 历史

夏尔·埃尔米特自1869年起任索邦大学分析学教授直至去世，最著名的工作是埃尔米特多项式、厄米矩阵以及1873年对 \(e\) 为超越数的证明。他在1870年代回到逼近与插值问题。1878年，《纯粹与应用数学杂志》刊载了他的论文，解决了如下问题：构造一个多项式，使其在指定点处不仅在函数值上、而且在前几阶导数上都匹配给定值，其中最高导数的阶数可随点而异。<sup>[1](https://imagescience.org/meijering/research/chronology/)</sup><sup> • </sup><sup>[22](https://www.math.auckland.ac.nz/hat/people/hermite.html)</sup> 这一思想的分段三次版本——在每个节点处规定一个导数——成为数值分析、图形学与结构力学中通用的标准埃尔米特样条。

## References

1. [A Chronology of Interpolation, E. Meijering](https://imagescience.org/meijering/research/chronology/)
2. [CubicHermiteSpline, SciPy v1.15.2 Manual](https://docs.scipy.org/doc/scipy-1.15.2/reference/generated/scipy.interpolate.CubicHermiteSpline.html)
3. [Course notes on splines, Ken Perlin, New York University (2016)](https://cs.nyu.edu/~perlin/courses/spring2016/0405/)
4. [Piecewise Polynomial Approximating Functions and Spline Interpolation, Lemesurier & Roberts](https://lemesurierb.people.charleston.edu/introduction-to-numerical-methods-and-analysis-python/docs/main/piecewise-polynomial-approximation-and-splines.html)
5. [Chapter 3: Interpolation and Polynomial Approximation, MATH 128A lecture notes, UC Berkeley](https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_3.html)
6. [D3DXVec3CatmullRom function, Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dxvec3catmullrom)
7. [Hermite Curve Interpolation, Nils Pipenbrinck, cubic.org (1998)](https://www.cubic.org/docs/hermite.htm)
8. [pchip: Piecewise Cubic Hermite Interpolating Polynomial, MathWorks](https://www.mathworks.com/help/matlab/ref/pchip.html)
9. [Treball de Fi de Màster (shape functions for the Euler-Bernoulli beam element), UPC](https://upcommons.upc.edu/bitstreams/0b8502a9-3a66-4185-9cc9-cb84fd23ab59/download)
10. [Support and approximation properties of Hermite splines, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6919321/)
11. [Adapting Cubic Hermite Splines to the Presence of Singularities Through Correction Terms, Journal of Scientific Computing (2023)](https://link.springer.com/article/10.1007/s10915-023-02191-9)
12. [Scientific Computing lecture notes, Chapter 7 (Cubic Spline Interpolation), M. Heath, NYU](https://cse.engineering.nyu.edu/~mleung/CS4744/f03/Heath/chap07.pdf)
13. [Interpolation, Chapter 3 of Numerical Computing with MATLAB, Cleve Moler, MathWorks](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/moler/interp.pdf)
14. [Interpolation with Two-Parameter Cubic Filters, Intel IPP Developer Reference](https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2022-0/interpolation-with-two-parameter-cubic-filters.html)
15. [ceres-solver cubic_interpolation.h, GitHub](https://github.com/ceres-solver/ceres-solver/blob/master/include/ceres/cubic_interpolation.h)
16. [MATH 350: Introduction to Computational Mathematics, Chapter III: Interpolation, Illinois Institute of Technology](https://math.iit.edu/~fass/Notes350_Ch3.pdf)
17. [RenderMan Curves Class Reference, Pixar](https://renderman.pixar.com/resources/rman26/classCurves.html)
18. [Euler-Bernoulli beam elements, Abaqus Theory documentation, Université catholique de Louvain](https://abaqus.uclouvain.be/English/SIMACAETHERefMap/simathe-c-eulerbernbeams.htm)
19. [Performance assessment of interpolation methods for orbits of altimetry satellites, Earth, Planets and Space (2024)](https://link.springer.com/article/10.1186/s40623-024-02102-8)
20. [Time-optimal trajectory design of distributed space systems, Acta Astronautica (2026)](https://doi.org/10.1016/j.actaastro.2026.05.056)
21. [Survey of Direct Transcription for Low-Thrust Space Trajectory Optimization, Abstract and Applied Analysis (2014)](https://onlinelibrary.wiley.com/doi/10.1155/2014/851720)
22. [Hermite, C., Sur la formule d'interpolation de Lagrange, Journal für die Reine und Angewandte Mathematik 84 (1878), 70-79, University of Auckland reference page](https://www.math.auckland.ac.nz/hat/people/hermite.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Numerical analysis and computation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/cubic-hermite-spline

English original: https://www.edgepedia.org/cubic-hermite-spline
