三次隐士样条插值python [英] Cubic hermit spline interpolation python

查看:131
本文介绍了三次隐士样条插值python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想计算一个三次多项式,该三次多项式由函数值和在指定点的导数定义.

I would like to calculate a third-degree polynomial that is defined by its function values and derivatives at specified points.

https://en.wikipedia.org/wiki/Cubic_Hermite_spline

我知道scipy的插值方法.具体地

I know of scipy's interpolation methods. Specifically

splprep 插补N维样条 和 splev 进行评价它的衍生物.

splprep to interpolate a N-dimensional spline and splev to eveluate its derivatives.

是否有一个python例程接收函数值 f(x)和对应于值 x 的导数 f'(x)并进行计算适合给定数据的样条线表示.

Is there a python routine that takes function values f(x) and derivatives f'(x) corresponding to values x and calculates a spline representation that fits the given data.

举个例子:
我在由坐标 x,y,z 定义的空间中有两个物体位置,并且我知道物体在这些位置的速度 x',y',z'.我现在可以插补对象随时间t在两点之间所经过的路径.考虑所有给定的参数.

To give an example:
I have two object positions in space defined by the coordinates x,y,z and I know the velocity x',y',z' of the object at these positions. Can I now interpolate the path that the object takes between the two points over time t. Taking all the given parameters into account.

推荐答案

您可以使用BPoly.from_derivatives.结果是伯恩斯坦基础上的多项式.

You can use BPoly.from_derivatives. The result is a polynomial in the Bernstein basis.

这篇关于三次隐士样条插值python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆