摘要
基于WebGL的第三方开源库Three.js,结合粒子系统,以Web Storm11.0.1为开发环境,分析落叶的物理运动过程,建立了落叶粒子系统三维模型。通过对系统内各个粒子位移的控制,简化了粒子的消亡过程。结合Three.js的简便性,模拟叶粒子近大远小的透视投影效果,不再需要在笛卡尔三维坐标系的Z轴上引入额外的控制,只需要使用特定的相机。同时,通过对粒子系统内粒子数量的控制,可以模拟出在不同自然条件下叶子落下的场景。使用Three.js可以直接在网页上渲染三维场景,而不需要额外的插件,同时也较好地利用了硬件加速,提高了图形渲染速度。实验结果表明,该方法具有真实的三维仿真效果以及较快的图形渲染速度。
Based on the third party open source library Three.js of WebGL and used the Web Storm11.0.1 as a development environment,we establish a three-dimensional model of leaf particle system after the analysis of the physical movement trails of fallen leaves and simplified the extinction process of particles by controlling the displacement of each particle in the system through the combination of particle system.Because of the simplicity of Three.js,the excess control on Z axis in Cartesian three-dimensional coordinate system is no longer needed to simulate the leaf particle's perspective effect that the objects look small in the distance and big on the contrary.Meanwhile,the scenes of falling leaves in different natural environment can be simulated through the quantity control of particle in the system.By using Three.js,the three-dimensional scenes could be rendered in the webpage directly without extra plug-ins,also the graphic rendering speed can be improved due to the better use of the hardware acceleration function.The experiment indicates that this method has realistic effect in three-dimensional simulation and faster speed in graphic rendering.
作者
张文娟
吴琼
曹欣然
ZHANG Wen-juan;WU Qiong;CAO Xin-ran(School of ComputerScience,Xi' an Shiyou University,Xi' an 710000,China)
出处
《计算机技术与发展》
2018年第6期165-169,共5页
Computer Technology and Development
基金
陕西省科技攻关项目(2016GY132)