通过分析比较火焰模拟的几种常用方法,提出一种基于数学物理方法与纹理绘制相结合的火焰模拟方法。首先,对N-S方程进行求解,并采用交错网格的方式进行离散化处理,计算出每个固定网格节点的状态量变化;然后,由温度场数据进行火焰颜色转换;最后,采用纹理绘制的方法对火焰进行渲染。实验表明,算法具有可行性和有效性。
Through the analysis of the several commonly used methods of flame simulation,a method of flame simulation combined the method of mathematical physics simulation method and texture mapping is proposed.Firstly,the Navier-Stokes equation is solved,together with method of staggered grid to manipulate the discretization,the volume change of the state of each fixed grid nodes is changed;Then,the flame color is converted by the temperature field data;Finally,the method of texture mapping is used to render the flame.Experiments show that the algorithm is feasible and valid.