java - 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)
解决方案
推荐阅读
- callback - 如何使用 pyomo 终止 gurobi 回调?
- postgresql - 如何获取在声明变量中获得多于一列的记录,在 where 条件下使用此变量
- apache-spark - PySpark:检查数组中的值是否在列中
- c - 查找数组中的最小正数 - 程序集
- line - 是否有任何 Visual Studio Code 代码格式化程序可以保持空行不变?
- python - python - 如何在不使用日志的情况下缩放值以在python中的同一图中绘制不同范围值的曲线?
- powershell - PsExec 远程脚本启动
- react-native - 如何在本机反应中将图像上传到服务器。使用多部分
- testing - Testlink:创建自定义报告
- prisma-graphql - 无法测试突变