以实际项目为研究背景,结合GPU(Graphic Processing Unit)的特点,采用Stam的半拉格朗日方法,将MacCormack格式用于NS(Navier-Stokes)方程的对流项求解,利用光线投射法渲染烟雾,在GPU上实现了NS方程的求解和烟雾的绘制,比较真实地模拟了三维烟雾.
Natural scene simulation is always a hot issue in Computer Graphic,especially for the physically-based simulation of smoke.The subject is on the background of an actual project.This paper is based on the Stam's semi-Lagrangian scheme;MacCormack scheme is used to solve the advection item of NS(Navier-Stokes)equations,and ray casting method is chosen to render the smoke.We solve the NS equations and render smoke through the GPU(Graphic Processing Unit).This method can be taken for realistic animation and real-time simulation of smoke in three-dimensional space.