首页 > 解决方案 > b样条曲线n点的实现

问题描述

嗨,我正在尝试实现 n 点样条曲线,但它似乎需要一些微积分知识。可惜我没有按照高中的计算。

我想要一个函数,它采用点 x 和 y 的列表并生成如下图所示的插值。

在此处输入图像描述 我不知道它是 b 样条曲线还是贝塞尔曲线。我认为这是第一个。

我知道java和python来画点,但任何易于理解的语言。我不想使用第三方库或函数

Example pseudocode:
float [] [] inter_points [] [2]
float [] spline (float [] x, float y []) {
// algorithm here
return inter_points;
};

draw_ellipse (points [] [0], points [1], 2,2)

标签: javapythonmathspline

解决方案


推荐阅读