摘要
通过研究粒子系统方法,结合面向对象的C++语言,建立粒子系统的过程模型,分析实际降雪物理运动过程,建立雪粒子系统三维模型,简化雪花下降过程中的运动模型,省去对速度的实时每帧控制。通过控制雪粒子位移来模拟受风力影响的实际宏观降雪雪景,同时通过参数控制实现风力强弱的影响效果和大雪小雪的景观控制,并在笛卡尔三维坐标系的z轴上引入指数函数F=e^x作为控制因子,使雪粒子满足近大远小的透视投影视点效果,具有三维景观效果,并结合OpenGL图形接口对降雪场景进行渲染。实验结果表明,该方法具有逼真的三维仿真效果且代码具有良好的可扩展性。
A falling snow algorithmic structure is proposed based on particle system, incorporating the object-oriented C + + language. A 3D model of particle system is built by analyzing the falling process of snow, simplified the motion model of the snowflakes falling process and saved each frame of real-time control for speed. The realistic snowing is simulated which affected by wind through control- ling the particles displacement. And on the z axis of three-dimensional Cartesian coordinate system, the index function F = ex is introduced as the controlling factor so that the simulation matches the perspective effect of perspective projection. The simulation is combined with OpenGL graphic interface. The experimental results show that this method has a realistic 3D simulation effect and the codes enable a good scalability.
出处
《计算机技术与发展》
2017年第1期130-133,138,共5页
Computer Technology and Development
基金
安徽省省级重点自然科学研究项目(KJ2013A009)