变形效果可控的通用二维图形变形算法
A General 2D Graphics Deformation Algorithm with Controllable Deformation Effects
-
摘要: 传统的二维图形变形算法将图形分为人造图形或有机图形进行变形, 不同分类的图形需应用不同的变形效果, 缺乏一个统一的变形框架. 为此, 基于变形效果属性, 提出一种可控的二维图形变形算法. 该算法基于多边形网格进行变形, 在多边形网格的顶点处引入旋转矩阵, 通过改变旋转矩阵的大小达到更改变形效果属性, 从而变更图形的变形效果; 用户设置变形效果信息后, 先分析并计算每个顶点的变形效果信息, 后利用变形效果信息及几何信息求解出顶点坐标, 实现变形效果可控的图形变形. 针对大量二维图形进行实验以及用户调研, 结果表明, 与现有方法相比, 所提算法变形的图形效果更好, 更符合用户的预期.Abstract: Traditional 2D shape deformation algorithms classify shapes into man-made shapes or organic shapes for deformation. Different types of shapes require different deformation effects, lacking a unified deformation framework. Therefore, a 2D shapes deformation algorithm based on controllable deformation effect properties is proposed. This work performs deformation based on polygon meshes, introducing a rotation matrix at the vertices of the polygon mesh. By changing the magnitude of the rotation matrix, the deformation effect properties can be altered to achieve the desired deformation effect on the shapes. After the user sets the deformation effect information, this method first analyzes and calculates the deformation effect information for each vertex, and then solves the vertex coordinates using the deformation effect information and geometric information, achieving controllable shape deformation. Experimental results on a large number of 2D shapes and user surveys indicate that the proposed method produces better deformation effects compared to existing methods and better meets user expectations.