谁会实现贝塞尔曲线

来源:百度知道 编辑:UC知道 时间:2024/06/20 11:32:59
哪位高手大哥会用c或c++或vb或别的做贝塞尔曲线,谢谢,麻烦您告诉我,给我写一下,我急用.做的不用太好,能看懂,没有错误就行了.谢谢了

/* Subroutine to generate a Bezier curve.
Copyright (c) 2000 David F. Rogers. All rights reserved.

b[] = array containing the defining polygon vertices
b[1] contains the x-component of the vertex
b[2] contains the y-component of the vertex
b[3] contains the z-component of the vertex
Basis = function to calculate the Bernstein basis value (see MECG Eq 5-65)
cpts = number of points to be calculated on the curve
Fractrl = function to calculate the factorial of a number
j[] = array containing the basis functions for a single value of t
npts = number of defining polygon vertices
p[] = array containing the curve points
p[1] contains the x-component of the point
p[2] contains the y-component of the point
p[3] contains the z-component o