光学 精密工程, 2017, 25 (4): 1112, 网络出版: 2017-06-02
多项式函数的实时水波模拟算法
Real-time water wave simulation algorithm by polynomial function
多项式函数 Gerstner波 泰勒展开式 三角函数 实时渲染 Polynomial function Gerstner wave Taylor expansion Trigonometric functions real-time rendering
摘要
本文通过分析三角函数的泰勒展开式, 提出了一种利用多项式函数优化三角函数的计算方法, 用于改善虚拟系统中水波模拟的实时性。本算法中, 通过引入多种控制波形的参数, 实现了水波波形的多样性。在此基础上, 还提出了一种计算表面法向量的方法, 以便更好地与周围环境及光线进行交互。选用自然水波图像作为参考, 并与当前典型算法Gerstner和FFT算法进行性能对比。实验结果表明, 本文算法能生成丰富、自然的水波运动, 且一定程度上减少了水波模拟过程中的计算量(约13%), 适用于实时性要求较高的系统。
Abstract
Through analyzing the Taylor expansion in trigonometric function, a calculation scheme by using polynomial function was proposed to optimize the Taylor expansion in trigonometric function. By doing that, the real-time performance of water wave simulation in virtual system was improved. Otherwise, the diversity of water wave was obtained through introducing various control parameters in polynomial function. Meanwhile, the surface normal vector calculation method was applied to achieve better results in light interaction between water surface and surrounding environment. The experimental on natural water wave indicates that the water wave movement generated by proposed algorithm is natural and diversification. It also can reduce the computational complexity in some degree(about 13%), which was more suitable for virtual scenes with high real-time requirement.
王志强, 马海波. 多项式函数的实时水波模拟算法[J]. 光学 精密工程, 2017, 25(4): 1112. WANG Zhi-qiang, MA Hai-bo. Real-time water wave simulation algorithm by polynomial function[J]. Optics and Precision Engineering, 2017, 25(4): 1112.