基于Babylon.js的n阶Bézier曲线轨迹设计  

Trajectory planning of n-order Bézier curve based on Babylon.js

在线阅读下载全文

作  者:徐爱群 王名宏 XU Aiqun;WANG Minghong(School of Mechanical and Energy Engineering,Zhejiang Univers让y of Science and Technology,Hangzhou 310023,Zhejiang,China)

机构地区:[1]浙江科技学院机械与能源工程学院,杭州310023

出  处:《浙江科技学院学报》2023年第1期40-47,共8页Journal of Zhejiang University of Science and Technology

基  金:浙江科技学院研究生教学改革研究项目(2020yjsjg01);浙江科技学院研究生科研创新基金(2020yjskc07)。

摘  要:【目的】为在Babylon.js环境下实现三维物体任意运动轨迹的生成,给出一种三维物体n阶Bézier曲线运动轨迹的设计方法。【方法】首先根据Bézier曲线的原理设计一种循环递归的插值计算方法,对任意中间控制点数的Bézier曲线路径都可快速绘制;然后对比二阶、三阶及六阶Bézier函数的实际绘制效果;最后在Babylon.js的官方训练场中对物体其他阶次Bézier曲线轨迹进行绘制和运动仿真,并对轨迹形状进行可视化交互设计与调整。【结果】试验中本文方法与传统方法的曲线轨迹重合,表明本文算法实现了n阶Bézier曲线轨迹的绘制;小球能绕所设计轨迹运动验证了本文方法在物体轨迹设计上的有效性;轨迹调整前后对比结果验证了本文方法可视化交互设计的可行性。【结论】本文方法能有效快速实现虚拟环境中的三维物体复杂运动路径的设计与生成,从而为采用Bézier曲线来规划网页端三维物体的运动轨迹提供了一种新方法。[Objective] In order to realize arbitrary trajectory generation of a 3D object in the environment of Babylon.js, a trajectory planning method of n-order Bézier curve was proposed on the part of a 3D object. [Method] First, a recursive interpolation algorithm was designed according to the principle of Bézier curve, capable of quickly drawing the path of Bézier curve with any intermediate control points;then, a comparison was made among the actual drawing effects of second-order, third-order and sixth-order Bézier functions;finally, Bézier curve trajectories of other orders of the object were drawn and simulated in the official training ground of Babylon.js, carrying out visual interaction design and adjustment of the trajectory shapes. [Result] In the experiment, the curve trajectories of the proposed method coincide with those of the traditional method, which shows that the algorithm can draw the trajectory of n-order Bézier curve;the ball can move around the designed trajectory, which verifies the effectiveness of the proposed method in trajectory planning of the object;the comparison results before and after trajectory adjustment verify the feasibility of the visual interaction design of the proposed method. [Conclusion] This method can effectively and quickly realize the design and generation of complex motion paths of a 3D object in the virtual environment, providing a new method for using Bézier curve to plan the motion trajectories of the 3D object on web pages.

关 键 词:Babylon.js BÉZIER曲线 轨迹生成 可视化交互设计 

分 类 号:TP391.7[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象