何振华
摘 要: 基于采样数据的线性变换,提出了一种曲线变形的思想;设计一种以Lagrange插值为基础的曲线变形算法,并进行算法复杂度分析。该方法能实现代数曲线间的变形处理,具有普遍的适用性和较高的计算精度。通过给出数值实例,验证了算法的有效性和可行性,该算法提供了曲线变形的一种有效途径。
关键词: 采样数据; 线性变换; 曲线变形; Lagrange插值; 算法
中图分类号:TP301.6 文献标志码:A 文章编号:1006-8228(2014)10-51-03
Curve deformation based on linear transformation of sampling data
He Zhenhua
(School of Information, Hangzhou Science & Technology Vocational Technical College, Hangzhou, Zhejiang 311402, China)
Abstract: The solution to the problem of curve deformation by the linear transformation of sampling data is put forward. The algorithm based on the Lagrange interpolation is designed. The complexity of the algorithm is discussed. The deformation method is researched in details. The result can be used to carry out the deformation of algebraic curves. The feasibility and validity of the algorithm is demonstrated by numerical experiment. The practice has proved that it provided an efficient approach to the problem of curve deformation.
Key words: sampling data; linear transformation; curve deformation; lagrange interpolation; algorithm
0 引言
曲线曲面变形方法在几何造型、计算机动画、图像Morphing技术中有着广泛的应用。
相关的研究工作已取得了不少成果。1984年Barr首先提出了整体与局部的变形方法[1],首次将变形方法引入到几何造型领域,该方法能够进行常规变形。1986年Sederberg和Parry提出了自由变形(FFD)的方法[2],该方法将变形操作用于物体所嵌入的变形空间,嵌入其中的物体形状随之发生变化,但该方法计算量比较大,时间复杂度为O(n3)。随后所提出的EFFD[3]、NFFD[4]、DFFD[5-7]、RFFD[8]都对FFD方法进行了改进和补充。
对比这些变形方法发现,这些变形方法的主要局限是:计算量大、理论分析复杂等。如DFFD控制顶点的反求是通过计算伪逆矩阵实现、轴变形方法在计算最近点时会产生二义性等等。本文提出的曲线变形算法对曲线上的离散采样数据作线性变换,以Lagrange插值为基础,利用采样数据对之间的转换实现两条曲线的互相变换,数值实例表明该算法计算简单,具有普遍的适用性及较高的计算精度。
1 采样数据线性变换
1.1 算法原理
给定两条代数曲线:……p>