CN106981095B - A kind of improved smooth free-form deformation - Google Patents
A kind of improved smooth free-form deformation Download PDFInfo
- Publication number
- CN106981095B CN106981095B CN201710154546.6A CN201710154546A CN106981095B CN 106981095 B CN106981095 B CN 106981095B CN 201710154546 A CN201710154546 A CN 201710154546A CN 106981095 B CN106981095 B CN 106981095B
- Authority
- CN
- China
- Prior art keywords
- equal
- interior angle
- trapezoid
- smooth free
- free deformation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明公开了一种改进的光滑自由变形算法,属于计算机图像处理技术领域,该算法包括三角均匀剖分步骤,在三角均匀剖分步骤中,通过利用等分段长度控制参数,使剖分产生子三角形的边长接近等分段长度控制参数,有效避免了狭长三角形或蜕化三角形的产生,使光滑自由变形更加鲁棒高效。
The invention discloses an improved smooth free deformation algorithm, belonging to the technical field of computer image processing. The algorithm includes a triangular uniform division step. In the triangular uniform division step, by using equal segment length control parameters, the division generates The side length of the sub-triangle is close to the control parameter of equal segment length, which effectively avoids the generation of narrow and long triangles or degenerate triangles, making smooth free deformation more robust and efficient.
Description
技术领域technical field
本发明涉及计算机图像处理技术领域,具体地说,涉及一种改进的光滑自由变形算法。The invention relates to the technical field of computer image processing, in particular to an improved smooth free deformation algorithm.
背景技术Background technique
在几何建模和计算机动画中,空间变形是几何外形编辑和柔性体动画生成的关键技术之一,其中,最具代表性的是自由变形技术(FFD),已发展出多个变种,如精确自由变形方法、光滑自由变形方法等,由于其简单易用、功能强大,已经被集成到3DS Max、Maya、Softimage XSI等商业软件中。In geometric modeling and computer animation, spatial deformation is one of the key technologies for geometric shape editing and flexible body animation generation. Among them, the most representative is free deformation technology (FFD), which has developed many variants, such as precise Free deformation methods, smooth free deformation methods, etc., have been integrated into commercial software such as 3DS Max, Maya, Softimage XSI, etc. due to their ease of use and powerful functions.
由于传统自由变形方法的变形是作用到待编辑模型的采样点上,再由采样点变形后的位置还原出模型的变形结果,导致其在变形过程中存在因采样点密度太小而出现走样的问题。Because the deformation of the traditional free deformation method acts on the sampling points of the model to be edited, and then restores the deformation results of the model from the deformed positions of the sampling points, resulting in aliasing due to the too small density of sampling points during the deformation process. question.
为解决走样问题,通常是增加采样点的密度,但会造成性能上较大的开销;更进一步的方法是根据面片大小和曲面曲率,自适应确定采样密度,虽然降低了性能开销,但自适应算法实现相对复杂,且无法很好地处理一些奇异情况。In order to solve the aliasing problem, the density of sampling points is usually increased, but it will cause a large performance overhead; a further method is to adaptively determine the sampling density according to the patch size and the curvature of the surface, although the performance overhead is reduced, but the The adaptation algorithm is relatively complex to implement and cannot handle some singular cases well.
精确自由变形作为解决FFD中走样问题的方法,其是通过沿节点盒切割初始三角面片,计算三角面片上足够数目采样点变形后的位置,再用采样点插值计算出原始三角面片变形后的精确结果。As a method to solve the aliasing problem in FFD, precise free deformation is to cut the initial triangular patch along the node box, calculate the deformed position of a sufficient number of sampling points on the triangular patch, and then use sampling point interpolation to calculate the original triangular patch after deformation. exact results.
光滑自由变形方法通过以下六步骤对精确自由变形方法进行改进:The smooth free deformation method improves upon the exact free deformation method in the following six steps:
(1)定义变形空间步骤(1) Define the deformation space step
选用B样条体作为变形空间,记作R(μ,ν,ω):Select the B-spline body as the deformation space, denoted as R(μ,ν,ω):
其中,表示mμ×mν×mω个控制顶点, 是B样条基函数。in, represents m μ ×m ν ×m ω control vertices, is the B-spline basis function.
然后用该变形空间包裹待变形模型。Then use the deformation space to wrap the model to be deformed.
(2)三角剖分步骤(2) Triangulation steps
通过B样条体上的节点盒分割初始三角面片。Split the initial triangular patch by node boxes on the B-spline body.
(3)模型嵌入步骤(3) Model embedding step
在本步骤中,嵌入过程为计算待变形模型在变形空间中参数坐标的过程,具体通过嵌入函数U=E(X)将采样点从世界坐标系映射到变形空间,其中,X 为采样点在世界坐标系中的坐标,U为采样点在变形空间中的参数坐标。In this step, the embedding process is the process of calculating the parameter coordinates of the model to be deformed in the deformation space. Specifically, the sampling point is mapped from the world coordinate system to the deformation space through the embedding function U=E(X), where X is the sampling point in the deformation space. The coordinates in the world coordinate system, U is the parameter coordinates of the sampling point in the deformation space.
嵌入函数E由变形空间决定,在光滑自由变形中,通常是通过一定方法构造B样条体,使嵌入变形空间点的参数坐标与该点在世界坐标系中的坐标相等,即E(X)=X,以简化嵌入过程中的计算。The embedding function E is determined by the deformation space. In smooth free deformation, the B-spline body is usually constructed by a certain method, so that the parameter coordinates of the point in the embedded deformation space are equal to the coordinates of the point in the world coordinate system, that is, E(X) =X to simplify calculations during embedding.
并通常选用三次贝塞尔曲面片来拟合精确的变形结果,由于每一个切割产生的三角形,都会在变形后得到一个三角贝赛尔曲面片,所以要在每一个切割产生的三角形上进行采样,共需要3×3个约束点及m(m由变形空间的次数决定)个拟合点,即光滑自由变形共需要9+m个采样点。Usually, cubic Bezier surfaces are used to fit accurate deformation results. Since each triangle generated by cutting will obtain a triangular Bezier surface after deformation, sampling should be performed on each triangle generated by cutting. , a total of 3 × 3 constraint points and m (m is determined by the number of deformation space) fitting points are required, that is, a total of 9+m sampling points are required for smooth free deformation.
然后用E(X)=X计算出采样点在变形空间中的参数坐标,同时通过重心坐标插值计算采样点的法向。Then use E(X)=X to calculate the parameter coordinates of the sampling point in the deformation space, and at the same time calculate the normal direction of the sampling point through the barycentric coordinate interpolation.
(4)几何变形步骤(4) Geometric deformation steps
几何变形过程为改变变形空间并将该变形传递至待变形模型的过程,具体为将采样点嵌入B样条体中,以通过这些采样点将变形空间的变形传递至待变形模型中的。当用户改变B样条体控制顶点的位置后,先将采样点的参数坐标和控制顶点位置代入到定义变形空间所用的公式中,以求得采样点变形后的位置;再以这些新的位置为输入,通过带约束的拟合方法,求出作为变形结果的三角贝塞尔曲面的控制顶点。The geometric deformation process is a process of changing the deformation space and transferring the deformation to the to-be-deformed model. Specifically, the sampling points are embedded in the B-spline body to transmit the deformation of the deformation space to the to-be-deformed model through these sampling points. When the user changes the position of the control vertex of the B-spline body, first substitute the parameter coordinates of the sampling point and the position of the control vertex into the formula used to define the deformation space to obtain the deformed position of the sampling point; then use these new positions As input, the control vertices of the triangular Bezier surface as the deformation result are obtained by a fitting method with constraints.
(5)法向变形步骤(5) Normal deformation step
为了解决精确自由变形中结果不够光滑自然的问题,通过重心坐标插值估算得采样点的法向,然后计算出采样点的法向量变形以后的值;接着,用与几何变形步骤中相同的方法,以采样点变形后的法向量为输入,用三次贝塞尔曲面片拟合出变形后的三角曲面片法向量场。在细分阶段同时细分法向量场,并以此作为细分三角形的法向,从而可得到在光滑边两侧视觉上G1连续的几何和 G0连续的法向量场;在尖锐边两侧G0连续的几何和G-1连续的法向量场。In order to solve the problem that the result is not smooth and natural in the precise free deformation, the normal direction of the sampling point is estimated by the barycentric coordinate interpolation, and then the value of the normal vector of the sampling point after deformation is calculated; then, using the same method as in the geometric deformation step, Taking the deformed normal vector of the sampling point as the input, the normal vector field of the deformed triangular surface patch is fitted by the cubic Bezier surface patch. In the subdivision stage, the normal vector field is subdivided at the same time, and the normal vector field is used as the normal direction of the subdivided triangle, so that visually G 1 continuous geometry and G 0 continuous normal vector field can be obtained on both sides of the smooth edge; Side G 0 continuous geometry and G -1 continuous normal vector field.
(6)几何微调步骤(6) Geometry fine-tuning steps
为了得到视觉上更加细腻的变形结果,还需根据法向信息对表示几何的三角贝塞尔曲面片的控制顶点进行微调。In order to obtain visually more delicate deformation results, it is also necessary to fine-tune the control vertices of the triangular Bezier patches representing the geometry according to the normal information.
(7)细分绘制步骤(7) Subdivision drawing steps
将法向变形步骤与几何微调步骤中的结果进行细分后绘制。Paint after subdividing the results from the normal deformation step and the geometry fine-tuning step.
经过上述七个步骤的处理后,通过将CUDA应用到了精确自由变形中,不仅可实现比精确自由变形方法快50倍左右的计算速度,而且改进了变形结果的视觉美观度。但是,在三角均匀剖分步骤中,其沿节点盒切割三角形,存在以下问题:(1)容易切割出狭长三角形和蜕化三角形,不仅会浪费计算资源,可能还会带来浮点数计算错误,导致程序运行速度变慢,鲁棒性变差;(2)通常切割产生的三角形越小,变形后的误差也越小,但在该步骤中,切割成的三角形大小由节点盒分布和模型三角形分布决定,用户难以控制切割结果,即,无法对模型变形后误差的大小进行控制。After the processing of the above seven steps, by applying CUDA to the precise free deformation, it can not only achieve a calculation speed about 50 times faster than the precise free deformation method, but also improve the visual aesthetics of the deformation results. However, in the step of uniform triangulation, it cuts triangles along the node box, which has the following problems: (1) It is easy to cut out long and narrow triangles and degenerate triangles, which not only wastes computing resources, but may also cause floating-point calculation errors, resulting in The running speed of the program becomes slower, and the robustness becomes worse; (2) Usually, the smaller the triangle produced by cutting, the smaller the error after deformation, but in this step, the size of the cut triangle is determined by the distribution of node boxes and the distribution of model triangles. It is decided that it is difficult for the user to control the cutting results, that is, the size of the error after the model is deformed cannot be controlled.
发明内容SUMMARY OF THE INVENTION
本发明的目的为提供一种改进的光滑自由变形算法,以解决现有光滑自由变形算法中三角剖分步骤中存在的问题,以使光滑自由变形更加鲁棒高效。The purpose of the present invention is to provide an improved smooth free deformation algorithm to solve the problems existing in the triangulation step in the existing smooth free deformation algorithm, so as to make the smooth free deformation more robust and efficient.
为了实现上述目的,本发明提供的光滑自由变形算法包括三角均匀剖分步骤;三角均匀剖分步骤包括:In order to achieve the above purpose, the smooth free deformation algorithm provided by the present invention includes the step of triangulation uniform division; the triangular uniform division step includes:
步骤1,获取初始三角面片;Step 1, obtain the initial triangular patch;
步骤2,依据等分段长度控制参数,对初始三角面片最小内角的两边进行等分;Step 2, according to the equal segment length control parameter, equally divide both sides of the minimum interior angle of the initial triangular facet;
步骤3,连接邻近最小内角顶点的两个等分点,形成顶三角形与待剖分四边形;Step 3, connect the two equal points adjacent to the vertex of the smallest interior angle to form the top triangle and the quadrilateral to be divided;
步骤4,以待剖分四边形与顶三角形共有的端点为起点,对应连接待剖分四边形上的等分点,剖分成若干个类梯形;Step 4, taking the common endpoint of the quadrilateral to be divided and the top triangle as the starting point, correspondingly connecting the equal points on the quadrilateral to be divided, and dividing it into several trapezoid-like shapes;
步骤5,依据等分段长度控制参数,对类梯形顶边与底边进行等分,并连接等分点对类梯形进行三角剖分;若最小内角两边上的等分点数不等,则重复步骤4与步骤5,以距离最小内角顶点最远的类梯形为待剖分四边形进行三角剖分,且以位于最小内角等分点数较少的边上的顶点为起点。Step 5: According to the equal segment length control parameter, divide the top and bottom edges of the trapezoid into equal parts, and connect the equal points to triangulate the trapezoid; if the number of equal parts on both sides of the minimum interior angle is not equal, repeat Steps 4 and 5: Triangulate the quadrilateral to be triangulated with the trapezoid that is farthest away from the vertex of the smallest interior angle, and start from the vertex located on the side with less equal points of the smallest interior angle.
在上述三角均匀剖分步骤中,利用等分段长度控制参数,使切割产生的子三角形的边长接近等分段长度控制参数,即分割产生的子三角形较接近正三角形,有效避免了狭长三角形或蜕化三角形的产生,使光滑自由变形过程更加鲁棒高效。In the above step of uniform triangulation, the equal segment length control parameters are used to make the side lengths of the sub-triangles generated by cutting close to the equal segment length control parameters, that is, the sub-triangles generated by segmentation are closer to regular triangles, which effectively avoids narrow and long triangles. Or the generation of degenerate triangles, making the smooth free deformation process more robust and efficient.
一个具体的方案为依据等分段长度控制参数对边进行等分的步骤包括:依据等分段数对边进行等分,等分段数为边长度与等分段长度控制参数之商的向上取整值。算法简单。A specific solution is that the steps of dividing the sides equally according to the equal-segment length control parameter include: dividing the sides equally according to the equal-segment number, and the equal-segment number is the upward direction of the quotient of the edge length and the equal-segment length control parameter. Round value. The algorithm is simple.
另一个的具体方案为步骤2包括:接收对等分段长度控制参数的设定。通过接收用户对等分段长度控制参数的设置,便于用户对分割产生子三角形的大小进行控制,以根据需求和硬件的性能,对变形误差进行控制。Another specific solution is that step 2 includes: receiving the setting of the peer segment length control parameter. By receiving the setting of the user's peer-to-peer segment length control parameters, it is convenient for the user to control the size of the sub-triangles generated by the segmentation, so as to control the deformation error according to the requirements and the performance of the hardware.
另一个具体方案为步骤2包括:根据初始三角面片的顶点坐标,计算最小内角两边的长度;计算最小内角两边的等分段数,等分段数为边长度与等分段长度控制参数之商的向上取整值;依据两边的端点坐标,计算等分点的坐标。Another specific solution is that step 2 includes: calculating the length of both sides of the minimum interior angle according to the vertex coordinates of the initial triangular facet; calculating the number of equal segments on both sides of the minimum interior angle, and the number of equal segments is the sum of the side length and the equal segment length control parameter. The quotient is rounded up; based on the coordinates of the endpoints on both sides, the coordinates of the bisection point are calculated.
另一个具体的方案,步骤1包括:从文件中读取待变形模型;对待变形模型进行三角化,形成初始三角面片。In another specific solution, step 1 includes: reading the to-be-deformed model from a file; and triangulating the to-be-deformed model to form an initial triangular patch.
另一个具体的方案,步骤2包括:根据初始三角面片的顶点坐标,计算各边长度,最小内角为与最短边相对的内角。In another specific solution, step 2 includes: calculating the length of each side according to the vertex coordinates of the initial triangular patch, and the minimum interior angle is the interior angle opposite to the shortest side.
另一个具体的方案,连接等分点对类梯形进行三角剖分的步骤包括:沿同一连接方向,连接类梯形上底与下底上对应等分点,形成若干四边形,并连接短对角线对四边形进行剖分。In another specific solution, the step of triangulating the trapezoid by connecting the bisectors includes: along the same connection direction, connecting the corresponding bisectors on the upper base and the lower base of the trapezoid to form a number of quadrilaterals, and connecting short diagonal lines. Divide the quadrilateral.
优选的方案为还包括步骤6:采用CVT优化方法对剖分结果进行优化。可使分割结果更加均匀。A preferred solution further includes step 6: using the CVT optimization method to optimize the subdivision result. It can make the segmentation result more uniform.
进一步的优选方案,对剖分结果进行5次CVT优化。更好地平衡优化效果与计算开销。A further preferred solution is to perform 5 CVT optimizations on the segmentation results. Better balance optimization effect and computational overhead.
与现有的方法相比,本发明的有益效果在于:Compared with the existing method, the beneficial effects of the present invention are:
(1)算法中不包含平面求交,更加高效、鲁棒。(1) The algorithm does not include plane intersection, which is more efficient and robust.
(2)剖分出的子三角形接近正三角形且面积接近相等,不会产生新的狭长或蜕化的三角形。(2) The divided sub-triangles are close to equilateral triangles and their areas are close to the same, and no new elongated or degenerate triangles will be generated.
附图说明Description of drawings
图1为本发明实施例的工作流程图;Fig. 1 is the working flow chart of the embodiment of the present invention;
图2为本发明实施例中三角均匀剖分步骤的工作流程图;Fig. 2 is the working flow chart of triangular uniform dissection step in the embodiment of the present invention;
图3为本发明实施例中三角均匀剖分步骤的部分过程示意图,其中(a) 为初始三角面片,(b)为查找出初始三角面片的最小内角,(c)为对最小内角两边进行等分,(d)为剖分出的顶三角形,(e)为第一个待剖分的类梯形,(f) 为对第一个类梯形上下底进行等分。3 is a schematic diagram of part of the process of the triangular uniform division step in the embodiment of the present invention, wherein (a) is the initial triangular patch, (b) is the minimum interior angle of the initial triangular patch, and (c) is the two sides of the minimum interior angle. Divide into equal parts, (d) is the top triangle to be divided, (e) is the first trapezoid to be divided, and (f) is the equal division of the upper and lower bases of the first trapezoid.
图4为本发明实施例中三角均匀剖分步骤的其他部分过程示意图,(a)为对第一个类梯形进行三角剖分,(b)为对第二个类梯形进行三角剖分,(c)为最后一个待剖分的类梯形,(d)为对最后一个类梯形进行部分三角剖分,(e) 为三角剖分结果,(f)为对剖分结果进行CVT优化。4 is a schematic diagram of other parts of the process of the triangulation uniform division step in the embodiment of the present invention, (a) triangulates the first trapezoid, (b) triangulates the second trapezoid, ( c) is the last trapezoid to be triangulated, (d) is the partial triangulation of the last trapezoid, (e) is the triangulation result, and (f) is the CVT optimization of the triangulation result.
具体实施方式Detailed ways
以下结合实施例及其附图对本发明作进一步说明。The present invention will be further described below with reference to the embodiments and the accompanying drawings.
实施例Example
参见图1,本发明改进的光滑自由变形算法包括定义变形空间步骤S1、三角均匀剖分步骤S2、模型嵌入步骤S3、几何变形步骤S4、法向变形步骤S5、几何微调步骤S6及细分绘制步骤S7。Referring to FIG. 1, the improved smooth free deformation algorithm of the present invention includes a step S1 of defining a deformation space, a step S2 of triangular uniform division, a step S3 of model embedding, a step of geometric deformation S4, a step of normal deformation S5, a step of fine-tuning geometry S6 and subdivision rendering Step S7.
定义变形空间步骤S1,定义一个B样条体作为包裹待变形模型的变形空间。Defining the deformation space Step S1, defining a B-spline body as the deformation space wrapping the to-be-deformed model.
三角均匀剖分步骤S2,用三角均匀剖分算法将待变形模型中的初始三角面片分割成若干个子三角形,以减小变形后的误差。In step S2 of uniform triangulation, the initial triangular patch in the model to be deformed is divided into several sub-triangles by the uniform triangulation algorithm, so as to reduce the error after deformation.
参见图2,三角均匀剖分步骤S2包括获取步骤S21、等分步骤S22、连接等分点步骤S23、剖分四边形步骤S24、剖分类梯形步骤S25及优化步骤S26。Referring to FIG. 2 , the triangular uniform division step S2 includes an acquisition step S21 , an equalization step S22 , a connection equalization point step S23 , a quadrilateral division step S24 , a classified trapezoidal division step S25 , and an optimization step S26 .
获取步骤S21,获取初始三角面片。Obtaining step S21, obtaining an initial triangular patch.
从文件中读取待变形模型;Read the model to be deformed from the file;
对待变形模型进行三角化,形成如图3(a)所示的初始三角面片1。Triangulate the to-be-deformed model to form the initial triangular patch 1 as shown in Figure 3(a).
等分步骤S22,依据等分段长度控制参数l,对初始三角面片最小内角的两边进行等分。In step S22 of equal division, according to the equal division length control parameter 1, two sides of the minimum interior angle of the initial triangular facet are equally divided.
接收对等分段长度控制参数l的设定,用户根据初始三角面片尺寸及其对精度的要求,通过输入界面对控制参数l进行设定,使用户能够更好地控制变形误差。Receive the setting of the peer-to-peer segment length control parameter l, and the user sets the control parameter l through the input interface according to the initial triangular facet size and its accuracy requirements, so that the user can better control the deformation error.
如图3(b)所示,根据初始三角面片1的顶点坐标,计算其边11、边12 及边13的长度,然后采用排序法对三边长度进行升序排列,其中位于第一位的边13所对的角α为初始三角面片1的最小内角。As shown in Figure 3(b), according to the vertex coordinates of the initial triangular patch 1, calculate the lengths of its side 11, side 12 and side 13, and then use the sorting method to arrange the lengths of the three sides in ascending order. The angle α subtended by the side 13 is the smallest interior angle of the initial triangular patch 1 .
计算最小内角的边11与边12的长度;依据等分段长度控制参数l,计算边11与边12的等分段数,其中,等分段数为边长度与等分段长度控制参数l之商的向上取整值,即边11与边12的等分段数分别为其中为边11的长度,为边12的长度。Calculate the length of side 11 and side 12 of the minimum interior angle; according to the equal-segment length control parameter 1, calculate the equal-segment number of side 11 and side 12, where the equal-segment number is the side length and equal-segment length control parameter l The rounded up value of the quotient of , that is, the number of equal segments of side 11 and side 12 are in is the length of side 11, is the length of side 12.
依据边11与边12的端点坐标,计算等分点坐标,对于最小内角具体的一边,例如边11,设其两个端点的坐标为P1,P2,则为边11上的各个等分点的坐标,其中,n为等分段数,t的取值为0到n。对初始三角面片1 的最小内角的两边11、12进行等分,结果如图3(c)所示。According to the coordinates of the endpoints of side 11 and side 12, calculate the coordinates of the bisector. For a specific side of the minimum interior angle, such as side 11, set the coordinates of its two endpoints to be P 1 and P 2 , then is the coordinates of each equal segment on side 11, where n is the number of equal segments, and t ranges from 0 to n. The two sides 11 and 12 of the smallest interior angle of the initial triangular patch 1 are equally divided, and the result is shown in Figure 3(c).
连接等分点步骤S23,参见图3(d),连接邻近最小内角顶点的两个等分点,形成顶三角形2与待剖分四边形3。The step S23 of connecting the bisected points, referring to FIG. 3(d), connects two bisected points adjacent to the vertex of the smallest interior angle to form the top triangle 2 and the quadrilateral to be divided 3.
剖分四边形步骤S24,如图3(d)所示,以待剖分四边形3与顶三角形2 共有的端点为起点,对应连接待剖分四边形3上的等分点,剖分成若干个类梯形,如图3(e)的实线部分为第一个类梯形31。Step S24 of dividing the quadrilateral, as shown in FIG. 3(d), taking the common endpoint of the quadrilateral 3 to be divided and the top triangle 2 as the starting point, correspondingly connecting the equal points on the quadrilateral to be divided 3, and dividing it into several trapezoid-like shapes , the solid line part of Fig. 3(e) is the first trapezoid 31.
剖分类梯形步骤S25,以如图3(e)所示的第一个类梯形31为例,依据等分段长度控制参数l,对第一个类梯形31的上底与下底进行等分,结果如图3(f)所示;沿同一连接方向,比如由图中的左向右,将对应连接上底与下底等分点形成的四边形用其短对角线进行剖分,结果如图4(a)所示。In step S25, the first class trapezoid 31 as shown in FIG. 3(e) is taken as an example, and the upper base and the lower base of the first class trapezoid 31 are equally divided according to the equal segment length control parameter 1. , the result is shown in Figure 3(f); along the same connection direction, such as from left to right in the figure, divide the quadrilateral formed by the corresponding connection points of the upper and lower bases with its short diagonals, the result As shown in Figure 4(a).
从上至下,依序对各个类梯形进行三角剖分,在剖分过程中,如图4(b) 所示,第二个类梯形32上底与下底的等分段数相等,连接其上底与下底上对应等分点,形成若干四边形,根据四边形的四个顶点计算其两条对角线的长度,沿着较短的那条对角线分割四边形,最终使每个四边形分割成两个三角形。From top to bottom, triangulate each trapezoid in sequence. During the triangulation process, as shown in Figure 4(b), the second trapezoid 32 has an equal number of equal segments of the upper and lower bases, and is connected to The upper base and the lower base correspond to bisected points to form several quadrilaterals. Calculate the length of its two diagonals according to the four vertices of the quadrilateral, and divide the quadrilateral along the shorter diagonal, and finally make each quadrilateral Divide into two triangles.
如图4(c)所示,第三个类梯形33的上底分割段数比下底少1,对上底和下底的均分点进行编号,上底的编号从左到右为1到k,下底的编号从左到右为1到k+1,在第三个类梯形33上,先连接上下底编号相同的点。除此之外,对于上底中的每个点,若其编号为j,则使将其与下底中编号为j+1的点相连,最终将第三个类梯形33分割成多个锯齿状的三角形。As shown in Fig. 4(c), the number of upper and lower segments of the third trapezoid-like 33 is 1 less than that of the lower base, and the average points of the upper and lower bases are numbered, and the number of the upper base is 1 to k, the number of the lower base is from 1 to k+1 from left to right. On the third trapezoid 33, first connect the points with the same number of the upper and lower bases. In addition, for each point in the upper base, if its number is j, connect it to the point numbered j+1 in the lower base, and finally divide the third trapezoid 33 into multiple sawtooth shaped triangle.
若最小内角两边上的等分点数不等,如图4(c)、图4(d)所示,重复步骤S24与步骤S25,以距离最小内角顶点最远的类梯形34为待剖分四边形进行三角剖分,且以位于最小内角等分点数较少的边上的顶点为起点。将距离最小内角顶点最远的类梯形33逆时针旋转90度,使该类梯形33和图3中待剖分四边形3类似,延长该类梯形33的上底和下底,相交后与最小内角的另一条边的剩余部分构成一个三角形,把该三角形当作如图3(a)所示的原始三角面片,并对其执行步骤S22至步骤S25,在剖分过程,初始三角面片1被分割成如图4(d)所示,直至三角面片1剖分成如图4(e)所示。If the number of equal points on both sides of the minimum interior angle is not equal, as shown in Fig. 4(c) and Fig. 4(d), repeat steps S24 and S25, and take the trapezoid 34 that is farthest from the vertex of the minimum interior angle as the quadrilateral to be divided Triangulates starting from vertices that lie on the edge with fewer points bisected by the smallest interior angle. Rotate the trapezoid 33 farthest from the vertex of the smallest interior angle by 90 degrees counterclockwise, so that this trapezoid 33 is similar to the quadrilateral 3 to be divided in Fig. The remaining part of the other side of the triangle constitutes a triangle, and the triangle is regarded as the original triangular patch as shown in Figure 3(a), and steps S22 to S25 are performed on it. In the division process, the initial triangular patch 1 It is divided as shown in Figure 4(d) until the triangular facet 1 is divided as shown in Figure 4(e).
优化步骤S26,如图4(f)所示,采用CVT优化方法对初始三角面片1 剖分结果进行优化,并对该结果进行5次CVT优化,使子三角形更加均匀。CVT 优化方法为DU Q,FABER V,GUNZBURGER M.CentroidalVoronoi tessellations: applications and algorithms[J].SIAM review,1999,41(4):637–676 中介绍的方法。In optimization step S26, as shown in Fig. 4(f), the CVT optimization method is used to optimize the initial triangular patch 1 subdivision result, and 5 CVT optimizations are performed on the result to make the sub-triangles more uniform. The CVT optimization method is the method introduced in DU Q, FABER V, GUNZBURGER M. CentroidalVoronoi tessellations: applications and algorithms[J].SIAM review,1999,41(4):637–676.
模型嵌入步骤S3,将模型嵌入变形空间,计算剖分后产生的每个三角面片的采样点在变形空间中的参数坐标和法向。The model embedding step S3 is to embed the model into the deformation space, and calculate the parameter coordinates and normal directions in the deformation space of the sampling points of each triangular patch generated after the division.
几何变形步骤S4,用户改变变形空间的控制顶点,对变形空间进行变形。保持采样点在变形空间中参数坐标不变,计算采样点在世界坐标系下的新的位置,根据得到变形后的采样点,用带约束的拟合方法计算出每个三角面片变形后的结果,该结果用三角贝塞尔曲面片表示。In the geometric deformation step S4, the user changes the control vertex of the deformation space to deform the deformation space. Keep the parameter coordinates of the sampling point unchanged in the deformation space, calculate the new position of the sampling point in the world coordinate system, and use the constrained fitting method to calculate the deformed shape of each triangular patch according to the deformed sampling point. As a result, the result is represented by a triangular Bezier patch.
法向变形步骤S5,计算采样点在世界坐标系下的新的法向,根据得到变形后的采样点的法向,用带约束的拟合方法计算出每个三角面片变形后的法向量场,该结果用三角贝塞尔曲面片表示。Normal deformation step S5: Calculate the new normal direction of the sampling point in the world coordinate system, and calculate the deformed normal vector of each triangular patch by the fitting method with constraints according to the normal direction of the deformed sampling point. field, the result is represented by a triangular Bezier patch.
几何微调步骤S6,调整几何变形步骤S4得到的三角贝塞尔曲面片的控制顶点,使变形结果更加光滑自然。The geometric fine-tuning step S6 is to adjust the control vertices of the triangular Bezier surface sheet obtained in the geometric deformation step S4 to make the deformation result more smooth and natural.
细分绘制步骤S7,将法向变形步骤S5与几何微调步骤S6中的结果进行细分后绘制。In the subdivision drawing step S7, the results in the normal deformation step S5 and the geometric fine-tuning step S6 are subdivided and drawn.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710154546.6A CN106981095B (en) | 2017-03-15 | 2017-03-15 | A kind of improved smooth free-form deformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710154546.6A CN106981095B (en) | 2017-03-15 | 2017-03-15 | A kind of improved smooth free-form deformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106981095A CN106981095A (en) | 2017-07-25 |
CN106981095B true CN106981095B (en) | 2019-05-28 |
Family
ID=59338068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710154546.6A Active CN106981095B (en) | 2017-03-15 | 2017-03-15 | A kind of improved smooth free-form deformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106981095B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110136169A (en) * | 2019-04-26 | 2019-08-16 | 哈尔滨工业大学(深圳) | A NURBS-based Deformation Tracking Method for Planar Flexible Body without Markers |
CN110570504B (en) * | 2019-09-06 | 2020-12-01 | 北京航天宏图信息技术股份有限公司 | Closed symbol drawing method and device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101034482A (en) * | 2006-03-07 | 2007-09-12 | 山东理工大学 | Method for automatically generating complex components three-dimensional self-adapting finite element grid |
CN101373543A (en) * | 2008-09-28 | 2009-02-25 | 武汉大学 | Fast Sectioning Method of 3D Mesh Model |
CN101533102A (en) * | 2009-04-09 | 2009-09-16 | 长江工程地球物理勘测武汉有限公司 | Triangular mesh ray tracing global method of two-dimensional complex construction |
WO2012017375A3 (en) * | 2010-08-05 | 2012-11-01 | Koninklijke Philips Electronics N.V. | In-plane and interactive surface mesh adaptation |
CN102938018A (en) * | 2012-10-16 | 2013-02-20 | 华北水利水电学院 | Partitioning method of equal-area global discrete grids based on warp and weft |
CN103440683B (en) * | 2013-04-28 | 2016-03-09 | 大连大学 | A kind of surface reconstruction method based on three-dimensional dense point cloud at random |
-
2017
- 2017-03-15 CN CN201710154546.6A patent/CN106981095B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101034482A (en) * | 2006-03-07 | 2007-09-12 | 山东理工大学 | Method for automatically generating complex components three-dimensional self-adapting finite element grid |
CN101373543A (en) * | 2008-09-28 | 2009-02-25 | 武汉大学 | Fast Sectioning Method of 3D Mesh Model |
CN101533102A (en) * | 2009-04-09 | 2009-09-16 | 长江工程地球物理勘测武汉有限公司 | Triangular mesh ray tracing global method of two-dimensional complex construction |
WO2012017375A3 (en) * | 2010-08-05 | 2012-11-01 | Koninklijke Philips Electronics N.V. | In-plane and interactive surface mesh adaptation |
CN102938018A (en) * | 2012-10-16 | 2013-02-20 | 华北水利水电学院 | Partitioning method of equal-area global discrete grids based on warp and weft |
CN103440683B (en) * | 2013-04-28 | 2016-03-09 | 大连大学 | A kind of surface reconstruction method based on three-dimensional dense point cloud at random |
Non-Patent Citations (3)
Title |
---|
A Distortion-Free Data Hiding Scheme for;Yuan-Yu Tsai;《Advances in Multimedia》;20161231;第2016卷;第1-10页 |
GPU-based smooth free-form deformation with sharp feature awareness;YuanminCui;《Computer Aided Geometric Design》;20150324;第69-81页 |
插值细分曲面三角剖分研究;顾耀林;《计算机应用》;20060131;第26卷(第1期);第146-148页 |
Also Published As
Publication number | Publication date |
---|---|
CN106981095A (en) | 2017-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lin et al. | Automatic polycube-maps | |
CN101719140B (en) | Graph retrieval method | |
CN110489778B (en) | Graph segmentation method and laser etching control system for laser etching processing | |
Alliez et al. | Centroidal Voronoi diagrams for isotropic surface remeshing | |
WO2011079421A1 (en) | Method for global paremeterization and quadrilateral gridding of point cloud data | |
US8810571B2 (en) | Methods and systems for generating continuous surfaces from polygonal data | |
US20240153123A1 (en) | Isogeometric Analysis Method Based on a Geometric Reconstruction Model | |
CN109472870B (en) | A Model Matching Method Based on Mesh Reconstruction and Multi-influence Domain Modification | |
CN103810756B (en) | The method for drafting of self adaptive Loop subdivision curved surface based on irregular area | |
CN104143209B (en) | Method for engraving three-dimensional model based on line pattern | |
CN102306397A (en) | Method for meshing point cloud data | |
CN102831645A (en) | Method for establishing digital elevation model applied to submarine topography | |
CN111462328B (en) | A Multi-3D Mesh Model Interpolation Method Based on Progressive Interpolation Subdivision Surface | |
CN110796735B (en) | Grid division method for NURBS curved surface finite element plate shell and computer realization system | |
CN106960469B (en) | A kind of smooth free-form deformation of Fast Segmentation triangle | |
CN107886569B (en) | Measurement-controllable surface parameterization method and system based on discrete lie derivative | |
CN106447767A (en) | Point cloud data tree trunk three-dimension trunk axis curve construction-based tree trunk parameter extraction method | |
CN116797762B (en) | Parameter curved surface grid generation method with controllable error | |
CN113012259B (en) | Method for filling concave polygon based on triangulation algorithm | |
CN108171799A (en) | A kind of method for reconstructing lamination area triangle gridding | |
CN106981095B (en) | A kind of improved smooth free-form deformation | |
CN108230452A (en) | A kind of model filling-up hole method based on textures synthesis | |
US20150206342A1 (en) | Methods and Systems for Generating Continuous Surfaces from Polygonal Data | |
Yang et al. | Neural parametric surfaces for shape modeling | |
CN114092676B (en) | Three-dimensional model adjustment method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |