针对三维虚拟现实环境中虚拟摄像机运动路径的实时规则问题,以二次有理Bezier曲线取代漫游路径的圆弧弯道,实现了路径优化。使用单源的最短路径算法对虚拟环境下的漫游路径进行初步规划;使用二次有理参数自由曲线对漫游路径上的圆弧弯道部分进行优化,并提供了首尾控制点的位置与及3个控制点上的形状参数等5个自由度,得到具有更高可控参数的路径;实现三维虚拟环境下的实时漫游。与圆弧方法过度弯道路径相比,该弯道过渡曲线具有更高的自由度、可调的弯道起止点、以及调整弯道形状的多个权值。
A novel algorithm is proposed to optimize the real-time roaming path, which is based on the quadratic rational Bezier curve. Firstly, basing on the Diikstra algorithm, the shortest polyline is computed as the rough path of virtual roaming, and the quadratic rational Bezier curve is used to replace the cornering arc on the path, the positions of begin point and end point, together with other three shape weight parameters are given as five degrees of freedom to adjust the shape of the curve path. Finally, the algorithm is tested in a virtual scene. Comparing to the arc path, the curve path has more freedom, the two endpoints of the curve can be adjusted along with the polylines, and more weight parameters with the control points exist.