﻿ 利用带形状参数的有理势函数构造基于Metaball的过渡曲线
 文章快速检索 高级检索
 浙江大学学报(理学版)  2017, Vol. 44 Issue (3): 307-313  DOI:10.3785/j.issn.1008-9497.2017.03.011 0

### 引用本文 [复制中英文]

[复制中文]
LI Juncheng, SONG Laizhong. Construction of transition curves based on Metaball technique using rational potential function with a shape parameter[J]. Journal of Zhejiang University(Science Edition), 2017, 44(3): 307-313. DOI: 10.3785/j.issn.1008-9497.2017.03.011.
[复制英文]

### 文章历史

1. 湖南人文科技学院 数学与金融学院, 湖南 娄底 417000;
2. 三峡大学 理学院, 湖北 宜昌 443002

Construction of transition curves based on Metaball technique using rational potential function with a shape parameter
LI Juncheng1 , SONG Laizhong2
1. College of Mathematics and Finances, Hunan University of Humanities, Science and Technology, Loudi 417000, Hunan Province, China;
2. College of Science, China Three Gorges University, Yichang 443002, Hubei Province, China
Abstract: Using the existing potential functions to construct transition curve based on Metaball technique, it can not have both quasi high order continuity and shape adjustability. To solving this problem, a rational potential function with a shape parameter is constructed ingeniously from a curve with shape parameters. Some properties of the rational potential function are studied. The rational potential function is expressed as a unified mathematical model, which can not only make the transition curve achieve quasi Ck continuity at the end points, but also adjust the shape of the transition curve by modifying the value of the shape parameter. Some examples showed that the transition curves with different continuities and shapes could be constructed by changing the degree and the shape parameter of the rational potential function, which could be used to meet different needs of the practical application.
Key words: potential function    shape parameter    Metaball technique    transition curve    shape adjustment

1 问题的描述

 图 1 构造基于Metaball的过渡曲线 Fig. 1 Construction of transition curves basedon Metaball technique

 $\mathit{\boldsymbol{R}}\left( t \right) = \mathit{\boldsymbol{P}}\left( t \right)f\left( t \right) + \mathit{\boldsymbol{Q}}\left( t \right)\left( {1 - f\left( t \right)} \right),$ (1)

 $\left\{ \begin{array}{l} f\left( 0 \right) = 1,\;\;\;\;f\left( 1 \right) = 0,\\ {f^{\left( i \right)}}\left( 0 \right) = {f^{\left( i \right)}}\left( 1 \right) = 0,\;\;\;i = 1,2, \cdots ,k. \end{array} \right.$ (2)

2 势函数的构造及其性质 2.1 势函数的构造

 $\mathit{\boldsymbol{b}}\left( t \right) = \sum\limits_{i = 0}^3 {{b_i}\left( t \right){\mathit{\boldsymbol{V}}_i}} ,$ (3)

 $\left\{ \begin{array}{l} {b_0}\left( t \right) = \frac{{\left( {1 - {\alpha _1}} \right){{\left( {1 - t} \right)}^{k + 1}}}}{{R\left( t \right)}},\\ {b_1}\left( t \right) = \frac{{\left( {{\alpha _1}{{\left( {1 - t} \right)}^{k + 1}} + {\omega _1}{{\left( {1 - t} \right)}^{k + 1}}t} \right)}}{{R\left( t \right)}},\\ {b_2}\left( t \right) = \frac{{\left( {{\omega _2}\left( {1 - t} \right){t^{k + 1}} + \left( {1 - {\alpha _2}} \right){t^{k + 1}}} \right)}}{{R\left( t \right)}},\\ {b_3}\left( t \right) = \frac{{{\alpha _2}{t^{k + 1}}}}{{R\left( t \right)}}. \end{array} \right.$ (4)

 $\begin{array}{*{20}{c}} {R\left( t \right) = {{\left( {1 - t} \right)}^{k + 1}} + {\omega _1}{{\left( {1 - t} \right)}^{k + 1}}t + }\\ {{\omega _2}\left( {1 - t} \right){t^{k + 1}} + {t^{k + 1}},} \end{array}$

 $\left\{ \begin{array}{l} \mathit{\boldsymbol{b}}\left( 0 \right) = {\mathit{\boldsymbol{V}}_0} + {\alpha _1}\left( {{\mathit{\boldsymbol{V}}_1} - {\mathit{\boldsymbol{V}}_0}} \right),\\ \mathit{\boldsymbol{b}}\left( 1 \right) = {\mathit{\boldsymbol{V}}_2} + {\alpha _2}\left( {{\mathit{\boldsymbol{V}}_3} - {\mathit{\boldsymbol{V}}_2}} \right),\\ {\mathit{\boldsymbol{b}}^{\left( i \right)}}\left( 0 \right) = {\left( { - 1} \right)^{i - 1}}{A_i}\left( {{\mathit{\boldsymbol{V}}_1} - {\mathit{\boldsymbol{V}}_0}} \right),\\ {\mathit{\boldsymbol{b}}^{\left( i \right)}}\left( 1 \right) = {B_i}\left( {{\mathit{\boldsymbol{V}}_3} - {\mathit{\boldsymbol{V}}_2}} \right), \end{array} \right.$ (5)

 $f\left( t \right) = {b_0}\left( t \right){y_0} + {b_1}\left( t \right){y_1} + {b_2}\left( t \right){y_2} + {b_3}\left( t \right){y_3},$ (6)

 $\left\{ \begin{array}{l} f\left( 0 \right) = {y_0} + {\alpha _1}\left( {{y_1} - {y_0}} \right),\\ f\left( 1 \right) = {y_2} + {\alpha _2}\left( {{y_3} - {y_2}} \right),\\ {f^{\left( i \right)}}\left( 0 \right) = {\left( { - 1} \right)^{i - 1}}{A_i}\left( {{y_1} - {y_0}} \right),\\ {f^{\left( i \right)}}\left( 1 \right) = {B_i}\left( {{y_3} - {y_2}} \right). \end{array} \right.$ (7)

 $\left\{ \begin{array}{l} {y_0} + {\alpha _1}\left( {{y_1} - {y_0}} \right) = 1,\\ {y_2} + {\alpha _2}\left( {{y_3} - {y_2}} \right) = 0,\\ {\left( { - 1} \right)^{i - 1}}{A_i}\left( {{y_1} - {y_0}} \right) = 0,\\ {B_i}\left( {{y_3} - {y_2}} \right) = 0. \end{array} \right.$ (8)

 $\left\{ \begin{array}{l} {y_0} = {y_1} = 1,\\ {y_2} = {y_3} = 0. \end{array} \right.$ (9)

 ${f_k}\left( t \right) = \frac{{{{\left( {1 - t} \right)}^{k + 1}} + \omega {{\left( {1 - t} \right)}^{k + 1}}t}}{{{{\left( {1 - t} \right)}^{k + 1}} + \omega {{\left( {1 - t} \right)}^{k + 1}}t + \omega \left( {1 - t} \right){t^{k + 1}} + {t^{k + 1}}}}$ (10)

2.2 势函数的性质

 $\begin{array}{*{20}{c}} {{f_k}\left( 0 \right) = 1,\;\;\;\;{f_k}\left( 1 \right) = 0,}\\ {f_k^{\left( i \right)}\left( 0 \right) = f_k^{\left( i \right)}\left( 1 \right) = 0,i = 1,2, \cdots k.} \end{array}$

 $\begin{array}{l} {f_1}\left( t \right) = \frac{{{{\left( {1 - t} \right)}^2} + \omega {{\left( {1 - t} \right)}^2}t}}{{{{\left( {1 - t} \right)}^2} + \omega {{\left( {1 - t} \right)}^2}t + {{\left( {1 - t} \right)}^2} + \omega \left( {1 - t} \right){t^2} + {t^2}}},\\ {f_2}\left( t \right) = \frac{{{{\left( {1 - t} \right)}^3} + \omega {{\left( {1 - t} \right)}^3}t}}{{{{\left( {1 - t} \right)}^3} + \omega {{\left( {1 - t} \right)}^3}t + \omega \left( {1 - t} \right){t^3} + {t^3}}},\\ {f_3}\left( t \right) = \frac{{{{\left( {1 - t} \right)}^4} + \omega {{\left( {1 - t} \right)}^4}t}}{{{{\left( {1 - t} \right)}^4} + \omega {{\left( {1 - t} \right)}^4}t + \omega \left( {1 - t} \right){t^4} + {t^4}}}. \end{array}$

 ${f_k}\left( {0.5} \right) = \frac{{{{0.5}^{k + 1}} + \omega {{0.5}^{k + 2}}}}{{2\left( {{{0.5}^{k + 1}} + \omega {{0.5}^{k + 2}}} \right)}} = 0.5.$

 $\mathit{\boldsymbol{R}}\left( {0.5} \right) = \frac{{\mathit{\boldsymbol{P}}\left( {0.5} \right) + \mathit{\boldsymbol{Q}}\left( {0.5} \right)}}{2}.$

 ${f_k}\left( {1 - t} \right) = \frac{{{t^{k + 1}} + \omega {t^{k + 1}}\left( {1 - t} \right)}}{{{t^{k + 1}} + \omega {t^{k + 1}}\left( {1 - t} \right) + \omega t{{\left( {1 - t} \right)}^{k + 1}} + {{\left( {1 - t} \right)}^{k + 1}}}},$ (11)

 ${f_k}\left( t \right) + {f_k}\left( {1 - t} \right) \equiv 1.$

 $\begin{array}{l} {g_k}\left( t \right) = {\left( {1 - t} \right)^{k + 1}}\left( {1 + \omega t} \right),\\ {h_k}\left( t \right) = {t^{k + 1}}\left( {1 + \omega \left( {1 - t} \right)} \right), \end{array}$

 $\begin{array}{*{20}{c}} {{{f'}_k}\left( t \right) = \frac{{{{g'}_k}\left( t \right){h_k}\left( t \right) - {g_k}\left( t \right){{h'}_k}\left( t \right)}}{{{{\left( {{g_k}\left( t \right) + {h_k}\left( t \right)} \right)}^2}}} = }\\ { - \frac{{{t^k}{{\left( {1 - t} \right)}^k}s\left( t \right)}}{{{{\left( {{g_k}\left( t \right) + {h_k}\left( t \right)} \right)}^2}}},} \end{array}$ (12)

 $s\left( t \right) = \left( {2\omega - k{\omega ^2}} \right){\left( {t - 0.5} \right)^2} + \frac{{\left( {\omega + 2} \right)\left( {2k + k\omega + 2} \right)}}{4}.$ (13)

k≥1, ω > 0时, 由式(13) 可得

 $\left\{ \begin{array}{l} s\left( 0 \right) = s\left( 1 \right) = \left( {1 + k} \right)\left( {1 + \omega } \right) > 0,\\ s\left( {0.5} \right) = \frac{{\left( {\omega + 2} \right)\left( {2k + k\omega + 2} \right)}}{4} > 0. \end{array} \right.$ (14)

 图 2 ω=2时的势函数fk(t)(k=1, 2, 3) Fig. 2 The potential function fk(t)(k=1, 2, 3) with ω=2

 $\begin{array}{l} {g_k}\left( t \right) = {\left( {1 - t} \right)^{k + 1}}\left( {1 + \omega t} \right),\\ {h_k}\left( t \right) = {t^{k + 1}}\left( {1 + \omega \left( {1 - t} \right)} \right), \end{array}$

 $\frac{{{\rm{d}}{f_k}\left( t \right)}}{{{\rm{d}}\omega }} = \frac{{{t^k}{{\left( {1 - t} \right)}^k}\left( {2t - 1} \right)}}{{{{\left( {{g_k}\left( t \right) + {h_k}\left( t \right)} \right)}^2}}}.$ (15)

 图 3 参数ω取不同值时的势函数f1(t) Fig. 3 The potential function f1(t) withdifferent values of the parameter ω

(1) 可令过渡曲线在两端点处达到拟Ck(k≥1) 连续.

(2) 具有统一的数学模型.

(1) 文献[10]所采用的势函数虽然结构简单, 但所构造的过渡曲线在端点处仅满足拟C1连续, 且无法调整过渡曲线的形状.而有理势函数fk(t)不仅可令过渡曲线在端点处达到拟Ck连续, 而且过渡曲线的形状还可通过所带的形状参数ω进行调整.

(2) 文献[11]所构造的2k+1次多项式势函数虽然可令过渡曲线在端点处达到拟Ck连续, 但无法调节过渡曲线的形状, 且满足不同连续性要求的势函数都需要通过求解方程组重新获得.而有理势函数fk(t)不仅具有统一的数学模型, 而且在令过渡曲线在端点处达到拟Ck连续的情形下仍可通过修改形状参数ω的值实现对过渡曲线形状的调整.

(3) 文献[11]所构造的几类三角混合势函数虽然可令过渡曲线具有形状可调性, 但过渡曲线在两端点处仅满足拟C1连续.而有理势函数fk(t)不仅可实现过渡曲线的形状可调, 而且还令过渡曲线在两端点处达到拟Ck连续.

(4) 虽然文献[12-14]所构造的调配函数可令过渡曲线同时具有形状可调性和在两端点处满足拟Ck(k=0, 1, 2) 连续性, 但都是将两被过渡曲线取为特定的带形状参数的曲线.而利用有理势函数fk(t)构造过渡曲线时, 不仅实现了形状可调和拟Ck连续, 而且两被过渡曲线可取为任意参数曲线.

(5) 文献[15]所构造的多项式势函数，不仅对两被过渡曲线的种类没有限制, 而且还可通过势函数中所带的参数调整过渡曲线的形状, 但过渡曲线在两端点处仅满足拟C2连续.而有理势函数fk(t)不仅对两被过渡曲线的种类没有限制, 而且在令过渡曲线在两端点处达到拟Ck(k≥1) 连续的情形下还可通过势函数所带的参数对其形状进行调整.

3 应用实例

(1) 直线与直线间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = 2\left( {1 - t} \right),\\ y\left( t \right) = 1 - t, \end{array} \right.\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = t,\\ y\left( t \right) = 2t, \end{array} \right.0 \le t \le 1.$

 图 4 直线与直线间的过渡曲线 Fig. 4 The transition curve between straight lines

(2) 直线与圆弧间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = - \left( {1 - t} \right),\\ y\left( t \right) = 1 - t, \end{array} \right.\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = \sin \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \cos \frac{\pi }{2}t, \end{array} \right.\;\;\;0 \le t \le 1.$

 图 5 直线与圆弧间的过渡曲线 Fig. 5 The transition curve betweenstraight line and arc

(3) 圆弧与圆弧间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = - \cos \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \sin \frac{\pi }{2}t, \end{array} \right.\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = 1 - \cos \frac{\pi }{5}t,\\ y\left( t \right) = \sin \frac{\pi }{5}t, \end{array} \right.\;\;\;0 \le t \le 1.$

 图 6 圆弧与圆弧间的过渡曲线 Fig. 6 The transition curve between arcs

(4) 直线与曲线间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = - \left( {1 - t} \right),\\ y\left( t \right) = 1 - t, \end{array} \right.\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = \frac{\pi }{2}t - \sin \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \cos \frac{\pi }{2}t, \end{array} \right.\;\;\;0 \le t \le 1.$

 图 7 直线与曲线间的过渡曲线 Fig. 7 The transition curve betweenstraight line and curve

(5) 圆弧与曲线间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = - \cos \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \sin \frac{\pi }{2}t, \end{array} \right.\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = \pi t - \sin \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \cos \frac{\pi }{2}t, \end{array} \right.\;\;\;0 \le t \le 1.$

 图 8 圆弧与曲线间的过渡曲线 Fig. 8 The transition curve between arcand curve

(6) 曲线与曲线间的过渡曲线

 $\left\{ \begin{array}{l} x\left( t \right) = \frac{1}{2}\left( {1 - t} \right),\\ y\left( t \right) = 2{\left( {1 - t} \right)^2}, \end{array} \right.\;\;\;\;\;\left\{ \begin{array}{l} x\left( t \right) = \pi t - \sin \frac{\pi }{2}t,\\ y\left( t \right) = 1 - \cos \frac{\pi }{2}t, \end{array} \right.\;\;\;0 \le t \le 1.$

 图 9 曲线与曲线间的过渡曲线 Fig. 9 The transition curve between curves

4 结语

 [1] YAN L L, LIANG Q F. An extension of the Bézier model[J]. Applied Mathematics and Computation, 2011, 218(6): 2863–2879. DOI:10.1016/j.amc.2011.08.030 [2] BASHIR U, ABBSA M, ALI J M. The G2 and C2 rational quadratic trigonometric Bézier curve with two shape parameters with applications[J]. Applied Mathematics and Computation, 2013, 219(20): 10183–10197. DOI:10.1016/j.amc.2013.03.110 [3] 王文涛, 汪国昭. 带形状参数的均匀B样条[J]. 计算机辅助设计与图形学学报, 2004, 16(6): 783–788. WANG W T, WANG G Z. Uniform B-spline with shape parameter[J]. Journal of Computer-Aided Design & Computer Graphics, 2004, 16(6): 783–788. [4] 左传桂, 汪国昭. 多形状参数的四阶均匀B样条曲线设计[J]. 浙江大学学报:理学版, 2007, 34(4): 401–404. ZUO C G, WANG G Z. Curve design of multi-parameter uniform B-spline blending function of order four[J]. Journal of Zhejiang University: Science Edition, 2007, 34(4): 401–404. [5] HAN X L, ZHU Y P. Curve construction based on five trigonometric blending functions[J]. BIT Numerical Mathematics, 2012, 52(4): 953–979. DOI:10.1007/s10543-012-0386-0 [6] 徐迎博, 喻德生. 带形状参数的二次三角Bézier曲线形状分析[J]. 浙江大学学报:理学版, 2013, 40(1): 35–41. XU Y B, YU D S. Shape analysis of quadratic trigonometric polynomial Bézier curves with a shape parameter[J]. Journal of Zhejiang University: Science Edition, 2013, 40(1): 35–41. [7] 王健立, 毕合春, 刘奎丰. 滚齿加工的齿轮齿根过渡曲线[J]. 机械传动, 2013, 37(1): 82–86. WANG J L, BI H C, LIU K F. Tooth root fillet curve of gear by hobbling[J]. Journal of Mechanical Transmission, 2013, 37(1): 82–86. [8] 郭蓓, 赵远扬, 李连生, 等. 旋叶式压缩机的气缸型线研究[J]. 西安交通大学学报, 2003, 37(3): 256–259. GUO B, ZHAN Y Y, LI L S, et al. Research on cylinder profile of rotary vane compressor[J]. Journal of Xi'an Jiaotong University, 2003, 37(3): 256–259. [9] 宋立权, 赵学科, 李智成, 等. 任意缸体旋叶式压缩机的叶片型线设计理论研究及应用[J]. 机械工程学报, 2011, 47(15): 143–148. SONG L Q, ZHAO X K, LI Z C, et al. Study and application of the designing theory of the vane profile for any rotary vane compressor[J]. Journal of Mechanical Engineering, 2011, 47(15): 143–148. [10] 李凌丰, 谭建荣, 赵海霞. 基于Metaball的过渡曲线[J]. 中国机械工程, 2005, 16(6): 483–486. LI L F, TAN J R, ZHAO H X. Construction method of transition curve based on Metaball technique[J]. China Mechanical Engineering, 2005, 16(6): 483–486. [11] 高晖, 寿华好. 势函数的构造及基于Metaball的过渡曲线[J]. 计算机辅助设计与图形学学报, 2015, 27(5): 900–906. GAO H, SHOU H H. Construction of potential function and transition curve based on Metaball technique[J]. Journal of Computer-Aided Design & Computer Graphics, 2015, 27(5): 900–906. [12] 刘华勇, 张大明, 李璐. 基于参数连续HCBézier-like曲线的过渡曲线的构造[J]. 纯粹数学与应用数学, 2011, 27(1): 69–74. LIU H Y, ZHANG D M, LI L. Constructing of blending HC Bézier-like curve preserving continuity[J]. Pure and Applied Mathematics, 2011, 27(1): 69–74. [13] 刘华勇, 张大明, 李璐, 等. 几何连续的Bézier-like曲线的形状调配[J]. 山东大学学报:理学版, 2012, 47(3): 51–55. LIU H Y, ZHANG D M, LI L, et al. Shape blending Bézier-like curve with geometric continuity[J]. Journal of Shandong University: Natural Science, 2012, 47(3): 51–55. [14] 刘华勇, 段小娟, 张大明, 等. 基于三角Bézier-like的过渡曲线构造[J]. 浙江大学学报:理学版, 2013, 40(1): 42–46. LIU H Y, DUAN X J, ZHANG D M, et al. Constructing of blending trigonometric Bézier-like curve[J]. Journal of Zhejiang University: Science Edition, 2013, 40(1): 42–46. [15] 李军成, 宋来忠, 刘成志. 带参数的多项式势函数与构造基于Metaball的过渡曲线[J]. 中国图象图形学报, 2016, 21(7): 893–900. LI J C, SONG L Z, LIU C Z. The polynomial potential function with a parameter and transition curve based on Metaball technology[J]. Journal of Image and Graphics, 2016, 21(7): 893–900. DOI:10.11834/jig.20160707 [16] 严兰兰, 韩旭里. 形状及光滑度可调的自动连续组合曲线曲面[J]. 计算机辅助设计与图形学学报, 2014, 26(10): 1654–1662. YAN L L, HAN X L. Automatic continuous composite curve and surface with adjustable shape and smoothness[J]. Journal of Computer-Aided Design & Computer Graphics, 2014, 26(10): 1654–1662.