重采样一系列点 [英] resampling a series of points

查看:46
本文介绍了重采样一系列点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 X 个样本的 3d 点数组(想象一个球的轨迹).

i have an array of points in 3d (imagine the trajectory of a ball) with X samples.

现在,我想对这些点重新采样,以便我有一个包含 y 个样本位置的新数组.

now, i want to resample these points so that i have a new array with positions with y samples.

y 可以大于或小于 x,但不能小于 1.总是至少有 1 个样本.

y can be bigger or smaller than x but not smaller than 1. there will always be at least 1 sample.

算法如何将原始数组重新采样为新数组?谢谢!

how would an algorithm look like to resample the original array into a new one? thanks!

推荐答案

基本思想是将 X 点绘制在图形上.然后使用一些合理的插值函数在它们之间进行插值.您可以使用线性插值、二次 B 样条等.通常,除非您有特定理由相信这些点代表高阶函数(例如 N4),否则您希望坚持相对低阶插值函数.

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 点.

Once you've done that, you have (essentially) a continuous line on your graph. To get your Y points, you just select Y points equally spaced along the graph's X axis.

这篇关于重采样一系列点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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