1

几天来,我一直在用各种公式撞墙,似乎找不到适用于以下几点的公式:

100,0
35,10
25,37
15,56
10,75
5,90
1,99
0,100

有没有一种好的方法可以得到一条连接所有这些点的曲线,而没有任何大的跳跃(IE - 我拥有的最好的公式是一个多项式曲线,它在 x 上非常接近 35 到 100 之间的负数。)

我需要一条平滑的渐变曲线,其中每个点之间的所有点的 Y 值都在同一范围内(IE - 从 35 到 100,曲线需要从 10 到 0 平滑)

4

1 回答 1

1

I'd suggest you look up cubic interpolation (a series of connected 3rd degree polynomials) or Bezier interpolation for instance.

If you have n points, then you can include them all with an n-1 degree polynomial, but you'll run into Runge's phenomenon for any nontrivial input.

You might be able to get a smooth curve between 35 and 100 with like a 1000 degree polynomial (by adding lots of intermediate points between the original points) and effectively push Runge's phenomenon outside of your interval.

于 2014-09-22T13:43:15.110 回答