我有一个 3d 点数组(想象一下球的轨迹),有 X 个样本。
现在,我想对这些点重新采样,以便我有一个新数组,其中包含 y 个样本的位置。
y 可以大于或小于 x,但不能小于 1。始终至少有 1 个样本。
将原始数组重新采样为新数组的算法会是什么样子?谢谢!
The basic idea is to take your X points and plot them on a graph. Then interpolate between them using some reasonable interpolation function. You could use linear interpolation, quadric B-splines, etc. Generally, unless you have a specific reason to believe the points represent a higher-order function (e.g. N4) you want to stick to a relatively low-order interpolation function.
完成此操作后,图表上(基本上)就会有一条连续的线。要获得 Y 点,您只需选择沿图形 X 轴等距分布的 Y 点。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)