带法向约束的自由曲线曲面重构在光学反射面设计中起着至关重要的作用.为解决法向约束下的曲线重构问题提出了一种优化方案,使得重构出的曲线在逼近数据点的同时,亦能满足相应法向约束.首先,利用惩罚函数的方法将带法向约束的优化问题转化为无约束的优化问题.然后,引入二进制编码的遗传算法(GA),建立合适的适应度函数,自适应产生优化节点向量,如此迭代进化,直到产生令人满意的重构曲线为止.考虑到节点向量非递减的特性,而遗传算法在寻找最优节点向量的过程中有可能打乱节点向量的顺序,所以在建立适应度函数的时候将变量调整为无序有界变量.通过与传统最小二乘方法和粒子群智能优化方法的比较,所提方案在解决带法向条件约束的曲线重构问题上优势明显,且对于任意形状的曲线重构都行之有效.
Freedom curve/surface reconstruction with normal constraints is crucial in optical reflecting surface design. In this paper a binary code based genetic algorithm for knot optimization scheme is proposed to reconstruct a B-spline curve that not only approximates the data points but also meets the corresponding normal constraints. First, the constrained optimization problem is transformed into an unconstrained optimization problem by means of penalty function method. Then, the binary code based genetic algorithm(GA) is applied to find the best knot vector after establishing a suitable fitness function. Finally, adaptive generation of optimal knot vector and iterative evolution result in a satisfactory reconstructed curve. Since knot vector is non decreasing,and genetic algorithm may disrupt the order of knot vector in searching for the optimal knot vector, a process is also built to adjust variables into disordered bounded variables in the fitness function. Test results and a comparison with the traditional least square method as well as modern particle swarm optimization method show that the proposed scheme for reconstructing B-spline curve with normal constraints is superior and effective on arbitrary shape of discrete data set.