分析了礼花粒子系统的基本模型及建模方法,将许多形状简单的微小粒子作为基本元素聚集起来,形成一个不规则的模糊物体,从而构成一个封闭的粒子系统.在此基础上采用Open-GL、纹理贴图和C++设计实现了三维礼花粒子系统,解决了模拟模糊物体计算不能达到实时性的问题.采用极坐标的形式对礼花的形状进行了改进,使礼花形状达到真正的三维效果,所实现的粒子系统在普通计算机上能达到很好的逼真性.同时采用FMOD引擎加入了声音效果,最后给出了任意形状礼花的实现方法.实验结果表明所提出的礼花模拟系统实现简单,实时性好,并具有极佳的模拟效果.
The basic model of fireworks particle system is analyzed and the particle system is constructed as an irregular and vague object which aggregates lots of simple shape and small particles as basic elements.A fireworks particle system is designed and implemented by OpenGL,texture mapping and C++by which the time consuming problem of simulating objects is solved.The shape of fireworks is optimized by introducing polar coordinates representation,which makes the system have a real 3-dimensional effect.The system can achieve real time performance and reality on regular computer.FMOD audio engine is adopted to add sound effect and a simulation algorithm of arbitrary shape fireworks is presented.Experimental results demonstrate that the proposed algorithm is simple and can generate good results in real time.