三次B样条曲线在实际工程中得到了广泛应用,但现有文献对基于任意数量控制点的B样条曲线生成方法论述较少。为了进一步推广B样条曲线在各领域的应用,介绍了一种三次B样条曲线生成的改进算法,该算法能显著提高效率。提出了用高性能的动态数组存储控制点的坐标,阐述了局部修改性的实现方法,采用Visual C++6.0为编程工具开发软件系统,实现了任意数量控制点的三次B样条曲线的动态绘制和局部修改。实例测试运行表明,所开发的系统准确、可靠。
Cubic B-spline curve is widely used in many projects. However, a few of literatures are available for generating method of B-spline curve based on random number of control points. To further promote the application in various fields, in this paper, an improved generating algorithm of cu- bic B-spline curve is discussed. This algorithm can improve generating efficient greatly. High performance dynamic array is used to store coordinate data of control points and an approach for the local modification is adopted. A software system is developed by using Visual C + + 6.0 to draw dynamically and locally modify cubic B-spline cure with random number of control points and local modification are realized. By testing examples, it is shown that this system is correct and reliable.