我研究了splines、nurbs和Bezier 曲线位,但找不到适合我需要的算法。我将不胜感激有关可以根据二维数组中的点绘制曲线的算法或函数的帮助。
例子:
我数组中的第一个起点:ex arr[1,2] = new Point(1,2)
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0, 1 ,0,0,0,0,0, 1 ,0 ,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0 ,0,0,0,0,0,0, 1 ,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0, 1 ,0, 0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
输出:
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0, 1 ,0,0,0,0,0, 1 ,0 ,0,0,0,0,0,0
0,0, 1 ,0,0,0,0, 1 ,0, 1 ,0,0,0,0,0,0
0,0,0, 1 ,0,0,0, 1 ,0,0, 1 ,0,0,0,0,0
0,0,0, 1 ,0,0, 1 ,0,0,0,0,0,0, 0,0,0
0,0,0,0, 1 , 1 , 1 ,0,0,0,0,0,0,0,0,0
0,0,0,0,0, 0 ,0, 0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0