三次有理B样条曲线及其应用
Cubic Rational B-Spline Curve and Its Application

作者: 白根柱 :浙江长征职业技术学院基础部,浙江 杭州;内蒙古民族大学数理学院,内蒙古 通辽;

关键词: 有理三次B样条光滑拼接轴线异面管道Cubic Rational B-Spline Curve Smooth Blending Non-Coplana Tube

摘要:
本文构造了通过给定控制多边形的始末端点且与始末控制多边形相切的一段三次有理B样条曲线,并以三次有理B样条曲线为轴线的管道光滑拼接了轴线异面管道。该方法相较于三段连续的三次均匀B样条曲线为轴线的三段光滑拼接的管道光滑拼接轴线异面管道和两段连续的二次均匀B样条曲线为轴线的两段光滑拼接的管道光滑拼接轴线异面管道其构造简单,易于应用。

Abstract: In this paper, we construct a section of cubic rational B-spline curve which is tangent to the start and end points of the control polygon. Tubes whose axes are in non-coplaner are smoothly blended by tube take cubic rational B-spline curve as its axis. Compared with the three-segment smooth  blending tubes with three-segment continuous cubic uniform B-spline curves as the axis between tubes whose axes are non-coplana, and the two-segment smooth blending tubes with quadratic uniform B-spline curves as the axis between tubes whose axes are non-coplana, the proposed method has the advantages of simple structure and easy application.

1. 引言

轴线异面管道光滑拼接是计算几何领域中难点基础问题。我们在基于轴线光滑拼接的管道拼接方面做了诸多尝试 [1] - [7]。Bézier曲线和B样条曲线是构造自由曲线的有力工具,但是Bézier曲线和B样条曲线各有优缺点:Bézier曲线通过控制多边形的两个端点,且与控制多边形的始边和终边相切,不能局部修改;B样条曲线具有局部可修改性,但是不通过控制多边形的始末端点。我们用三点共线方法构造了三段连续的三次均匀B样条曲线光滑拼接两个异面直线,实现了轴线光滑拼接的三段管道拼接。还可以用两重顶点的技术构造三段连续的轴线来构造管道拼接。而用三点共线或两重顶点的技术会增加曲线的段数。用过指定顶点的一段三次均匀B样条曲线拼接异面直线时,在视觉上的光顺性达不到预期。本文拟构造一段过指定顶点的三次均匀有理B样条曲线,并用于轴线异面管道拼接。

2. 过指定顶点的三次有理B样条曲线及其性质

定义1 设

r ( t ) = i = 0 3 N i , 3 ( t ) V i + 1

r ( t ) = j = 0 3 N j , 3 ( t ) ω j V i + j j = 0 3 N j , 3 ( t ) ω j

分别称为三次均匀B样条函数和三次均匀有理B样条函数。其中 N 0 , 3 ( t ) , N 1 , 3 ( t ) , N 2 , 3 ( t ) , N 3 , 3 ( t ) 为三次均匀B样条基, V 0 , V 1 , V 2 , V 3 为特征多边形的顶点。令 N j , 3 ( t , w 0 ) = N j , 3 w j ( j = 0 , 1 , 2 , 3 ) ,则三次均匀有理B样条曲线可表示为

r ( t ) = j = 0 3 N j , 3 ( t , ω j ) V i + j j = 0 3 N j , 3 ( t , ω j )

P 0 , P 1 , P 2 , P 3 是给定的三次均匀B样条曲线的控制多边形的顶点,构造一段实际控制顶点为 V 0 , V 1 , V 2 , V 3 的三次均匀有理B样条曲线,使得端点是 P 0 P 3 ,且 P 0 P 3 处的切线分别为 P 1 P 0 P 3 P 2 ,则

{ r ( 0 ) = P 0 , r ( 1 ) = P 3 , r ( 0 ) = P 1 P 0 , r ( 1 ) = P 3 P 2 .

代入后得

{ V 0 = ( 25 w 0 + 16 w 1 17 P 0 w 2 ) P 0 + ( 7 w 0 28 w 1 7 w 2 ) P 1 + ( 2 w 1 + 8 w 2 + 2 w 3 ) P 2 + ( 10 w 1 + 16 w 2 2 w 3 ) P 3 18 w 0 , V 1 = ( 2 w 0 16 w 1 10 w 2 ) P 0 + ( 2 w 0 8 w 1 2 w 2 ) P 1 + ( w 1 + 4 w 2 + w 2 ) P 2 + ( 5 w 3 + 5 w 1 + 8 w 2 w 3 ) P 3 18 w 1 , V 2 = ( w 0 8 w 1 5 w 2 ) P 0 + ( w 0 4 w 1 w 2 ) P 1 + ( 2 w 1 + 8 w 2 + 2 w 3 ) P 2 + ( 10 w 1 + 16 P 3 w 2 2 w 3 ) P 3 18 w 2 , V 3 = ( 2 w 0 16 w 1 10 w 2 ) P 0 + ( 2 w 0 8 w 1 2 w 2 ) P 1 + ( 7 w 1 + 28 w 2 + 7 w 3 ) P 2 + ( 17 w 1 16 w 2 25 w 3 ) P 3 18 w 3 . (1)

P 0 , P 1 , P 2 , P 3 的坐标 ( P 1 , j , P 2 , j , P 3 , j ) ( j = 0 , 1 , 2 , 3 ) ,代入,可得所求三次均匀有理B样条曲线的实际控制顶点 V 0 ( x 0 , y 0 , z 0 ) V 1 ( x 1 , y 1 , z 1 ) V 2 ( x 2 , y 2 , z 2 ) V 3 ( x 3 , y 3 , z 3 ) ,则所求三次均匀有理B样条曲线的参数表达式为

{ x ( t , w ) = j = 0 3 N j , 3 ( t , w j ) x j j = 0 3 N j , 3 ( t , w j ) , y ( t , w ) = j = 0 3 N j , 3 ( t , w j ) y j j = 0 3 N j , 3 ( t , w j ) , z ( t , w ) = j = 0 3 N j , 3 ( t , w j ) z j j = 0 3 N j , 3 ( t , w j ) . t [ 0 , 1 ]

例1 设 P 0 ( 3 , 3 , 0 ) , P 1 ( 3 , 0 , 0 ) , P 2 ( 0 , 4 , 0 ) , P 3 ( 0 , 4 , 3 ) 是给定的点,由式子可以得到端点为 P 0 P 3 ,且 P 0 P 3 处的切线分别为 P 1 P 0 P 3 P 2 的实际控制顶点为 V 0 ( x 0 , y 0 , z 0 ) V 1 ( x 1 , y 1 , z 1 ) V 2 ( x 2 , y 2 , z 2 ) V 3 ( x 3 , y 3 , z 3 ) 的三次均匀有理B样条曲线。其中 V 0 , V 1 , V 2 , V 3 的坐标可表示为:

{ x 0 = 54 ω 0 36 ω 1 72 ω 2 18 ω 0 , y 0 = 75 ω 0 + 147 ω 2 18 ω 0 , z 0 = 30 ω 1 + 48 ω 2 6 ω 3 18 ω 0 . { x 1 = 4 ω 1 + 2 ω 2 ω 1 , y 1 = 6 ω 0 + 72 ω 1 + 78 ω 2 18 ω 1 , z 1 = 15 ω 1 + 24 ω 2 3 ω 3 18 ω 1 .

{ x 2 = 2 ω 1 + ω 2 ω 2 , y 2 = 3 ω 0 + 72 ω 1 + 111 ω 2 18 ω 2 , z 2 = 30 ω 1 + 48 ω 2 6 ω 3 18 ω 2 . { x 3 = 4 ω 1 + 2 ω 2 ω 3 , y 3 = 6 ω 0 144 ω 1 78 ω 2 + 72 3 18 ω 3 , z 0 = 51 ω 1 + 48 ω 2 + 75 ω 3 18 ω 3 .

其中 ω 0 , ω 1 , ω 2 , ω 3 是权因子。可设 ω 0 = ω 3 ,有以下性质:

(1) 当 | ω 0 | = | ω 1 | = | ω 2 | = | ω 3 | 1 ω 0 , ω 1 , ω 2 , ω 3 < 0 时,是一条过 P 0 P 3 ,且 P 0 P 3 处的切线分别为 P 1 P 0 P 3 P 2 的实际控制顶点为 V 0 ( x 0 , y 0 , z 0 ) V 1 ( x 1 , y 1 , z 1 ) V 2 ( x 2 , y 2 , z 2 ) V 3 ( x 3 , y 3 , z 3 ) 的三次均匀B样条曲线。

(2) 当 ω 0 = ω 3 = 1 , 0 < ω 1 , ω 2 < 1 时,是一条过 P 0 P 3 ,且 P 0 P 3 处的切线分别为 P 1 P 0 P 3 P 2 的实际控制顶点为 V 0 ( x 0 , y 0 , z 0 ) V 1 ( x 1 , y 1 , z 1 ) V 2 ( x 2 , y 2 , z 2 ) V 3 ( x 3 , y 3 , z 3 ) 的三次有理B样条曲线, ω 1 , ω 2 越小,曲线越靠近控制多边形的边 P 1 P 2

图1分别为 ω 0 = ω 1 = ω 2 = ω 3 = 1 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 10 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 20 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 30 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 时,过 P 0 P 3 ,且 P 0 P 3 处的切线分别为 P 1 P 0 P 3 P 2 的有理B样条曲线, 0 < ω 1 , ω 2 < 1 越小曲线越靠近控制多边形的边 P 1 P 2

Figure 1. The adjustment function of rational B-spline curve with different weight factor ω 0 , ω 1 , ω 2 , ω 3

图1. 权因子 ω 0 , ω 1 , ω 2 , ω 3 取不同值时,对有理B样条曲线的调节功能

3. 过指定顶点的三次有理B样条曲线及其在轴线异面管道拼接中的应用

在以上讨论中,假设 P 0 P 1 P 2 P 3 是异面直线,而三次有理B样条曲线的端点是 P 0 P 3 ,且曲线在 P 0 P 3 处分别与 P 0 P 1 P 2 P 3 相切。这样,我们可以利用文 [2] 和 [7] 中方法,将此三次均匀有理B样条曲线应用于轴线异面管道拼接中。

例2 设

Φ 1 ( t , φ ) : { x ( t , φ ) = 3 + a e 11 sin φ + a e 21 cos φ , y ( t , φ ) = 3 + t + a e 12 sin φ + a e 22 cos φ , z ( t , φ ) = 0 + a e 13 sin φ + a e 23 cos φ . t [ 0 , 1 ] , φ [ 0 , 2 π ]

Φ 2 ( t , φ ) : { x ( t , φ ) = 0 + a e 11 sin φ + a e 21 cos φ , y ( t , φ ) = 4 + a e 12 sin φ + a e 22 cos φ , z ( t , φ ) = 3 + t + a e 13 sin φ + a e 23 cos φ . t [ 0 , 1 ] , φ [ 0 , 2 π ]

是两个轴线异面的粗细相同的圆管道。其中 γ 1 ( t ) = { x 1 ( t ) = 3 , y 1 ( t ) = 3 + t , z 1 ( t ) = 0. γ 2 ( t ) = { x 2 ( t ) = 0 , y 2 ( t ) = 4 , z 2 ( t ) = 3 + t . t [ 0 , 1 ] 为管道 Φ 1 , Φ 2 的轴线的表达式, E i = ( e i 1 , e i 2 , e i 3 ) , E i = ( e i 1 , e i 2 , e i 3 ) ( i = 1 , 2 ) 分别为与轴心垂直平面的单位正交矢量。则光滑拼接两个轴线异面管道 Φ 1 ( t , φ ) Φ 2 ( t , φ ) 的以三次B样条曲线为轴线的管道的参数表达式为 [2]

Φ ( t , φ ) : { x ( t , φ ) = x ( t ) + a B 1 ( t ) sin φ + a N 1 ( t ) cos φ , y ( t , φ ) = y ( t ) + a B 2 ( t ) sin φ + a N 2 ( t ) cos φ , z ( t , φ ) = z ( t ) + a B 3 ( t ) sin φ + a N 3 ( t ) cos φ . t [ 0 , 1 ] , φ [ 0 , 2 π ]

其中 γ ( t ) = { x ( t ) , y ( t ) , z ( t ) . 是当 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 时,光滑拼接两个轴线异面管道轴线的三次有理B样条曲线。

γ ( t ) : { x ( t ) = 3 ( 37 t 3 129 t 2 + 147 t 55 ) 147 t 2 147 t + 55 , y ( t ) = 424 t 3 645 t 2 + 666 t 165 147 t 2 147 t + 55 , z ( t ) = 276 t 3 111 t 2 147 t 2 147 t + 55 . t [ 0 , 1 ]

拼接效果图为图2所示

Figure 2. When, ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 , the effect drawing of circular tube is the same radiuses tube with cubic rational B-spline curve as the axis

图2. ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 时,以三次有理B样条曲线为轴线的管道粗细相同圆管道效果图

例3 设

Φ 1 ( t , φ ) : { x ( t , φ ) = 3 + a e 11 sin φ + a e 21 cos φ , y ( t , φ ) = 3 + t + a e 12 sin φ + a e 22 cos φ , z ( t , φ ) = 0 + a e 13 sin φ + a e 23 cos φ . t [ 0 , 1 ] , φ [ 0 , 2 π ]

Φ 2 ( t , φ ) : { x ( t , φ ) = 0 + b e 11 sin φ + b e 21 cos φ , y ( t , φ ) = 4 + b e 12 sin φ + b e 22 cos φ , z ( t , φ ) = 3 + t + b e 13 sin φ + b e 23 cos φ . t [ 0 , 1 ] , φ [ 0 , 2 π ]

是两个轴线异面的粗细相同的圆管道。其中 γ 1 ( t ) = { x 1 ( t ) = 3 , y 1 ( t ) = 3 + t , z 1 ( t ) = 0. γ 2 ( t ) = { x 2 ( t ) = 0 , y 2 ( t ) = 4 , z 2 ( t ) = 3 + t . t [ 0 , 1 ] 为管道 Φ 1 , Φ 2 的轴线的表达式, E i = ( e i 1 , e i 2 , e i 3 ) , E i = ( e i 1 , e i 2 , e i 3 ) ( i = 1 , 2 ) 分别为与轴心垂直平面的单位正交矢量。则光滑拼接两个轴线异面管道 Φ 1 ( t , φ ) Φ 2 ( t , φ ) 的以三次B样条曲线为轴线的管道的参数表达式为 [7]

Φ ( t , φ ) = { x ( t ) + d ( t ) N 1 ( t ) cos φ + d ( t ) B 1 ( t ) sin φ , y ( t ) + d ( t ) N 2 ( t ) cos φ + d ( t ) B 2 ( t ) sin φ , z ( t ) + d ( t ) N 3 ( t ) cos φ + d ( t ) B 3 ( t ) sin φ . t [ 0 , 1 ] , φ [ 0 , 2 π ] .

其中 γ ( t ) = { x ( t ) , y ( t ) , z ( t ) . γ ( t ) = { x ( t ) , y ( t ) , z ( t ) . 是当 ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 时,分别光滑拼接两个轴线异面管道轴线

和粗细不同管道某两个母线的三次有理B样条曲线, d ( t ) = γ ( t ) γ ( t )

γ ( t ) = { x ( t ) = 2 ( 49 t 3 165 t 2 + 183 t 67 ) 147 t 2 147 t + 55 , y ( t ) = 360 t 3 681 t 2 + 606 t 165 147 t 2 147 t + 55 , z ( t ) = 276 t 3 111 t 2 147 t 2 147 t + 55 . t [ 0 , 1 ]

拼接效果图为图3所示

Figure 3. When, ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 , the effect drawing of circular tube is the different radiuses tube with cubic rational B-spline curve as the axis

图3. ω 0 = ω 3 = 1 , ω 1 = ω 2 = 1 50 时,以三次有理B样条曲线为轴线的管道粗细不同圆管道效果图

4. 结束语

我们构造了一段过顶点的三次均匀有理B样条曲线,并将其应用于轴线的圆管道的光滑拼接,其拼接效果很理想。但是,通过选取权因子调整轴线靠近或远离三次有理B样条曲线的控制多边形时,轴线两端点附近的切线发生急剧变化,不能构造光滑拼接两个轴线异面椭圆管道的拼接管道,需要进一步研究。

基金项目

国家自然科学基金项目资助(11561052),浙江省教育厅一般项目资助Y (201636628)。

文章引用: 白根柱 (2020) 三次有理B样条曲线及其应用。 应用数学进展, 9, 1331-1337. doi: 10.12677/AAM.2020.98157

参考文献

[1] Wang, H. and Bai, G.Z. (2013) Employing Generalized Cylindrical Helicoid Tube to Smoothly Blending Tubes Whose Axes Are Non-Coplanar. Applied Mechanics and Materials, 380-384, 1750-1754.
https://doi.org/10.4028/www.scientific.net/AMM.380-384.1750

[2] Bai, G.-Z., Wang, H., et al. (2014) Smoothly Blending of Two Elliptic Cylinders Whose Axes Are Non-Coplanar. Aplied Mechanics and Materials, 309-312, 644-650.
https://doi.org/10.4028/www.scientific.net/AMM.644-650.309

[3] Bai, G.-Z., Liu, S.-Y., Wang, H., W, Z. and Zhao, J.-Y. (2014) A Novel Method for Smooth Blending Cylindrical Surfaces Whose Axes Are Non-Coplanar Based on Smooth Blending Axes. Applied Mechanics and Materials, 687-691, 1470-1473.
https://doi.org/10.4028/www.scientific.net/AMM.687-691.1470

[4] Bai, G.Z., Wu, Z. and Lin, X. (2017) Intersecting Line of Conical Surface and Smoothly Blending of Two Tubes Whose Axes Are Non-Coplanar. Journal of Applied Mathematics and Physics, 5, 1887-1991.
https://doi.org/10.4236/jamp.2017.59158

[5] Bai, G.Z., Wang, H. and Yin, Z.J. (2014) Employing Generalized Bezier Tube to Smoothly Blending Tubes Whose Axes Are Non-Coplanar. Applied Mechanics and Materials, 513-517, 2301-2306.
https://doi.org/10.4028/www.scientific.net/AMM.513-517.2301

[6] Bai, G.Z. and Wang, F. (2019) Application of Quasi-Cubic Bezier Curves in the Blending of Tubes with Different Radiuses. Materials Science and Engineering, Vol. 612, 1-7.
https://doi.org/10.1088/1757-899X/612/3/032171

[7] 白根柱. 基于轴线光滑拼接的轴线异面管道拼接技术[J]. 应用数学进展, 2019, 8(7): 1267-1271.

分享
Top