Division of Mathematical Biology, MRC National Institute for Medical Research, The Ridgeway, Mill Hill, London NW7 1AA, UK.
Comput Biol Chem. 2010 Apr;34(2):71-9. doi: 10.1016/j.compbiolchem.2010.01.001. Epub 2010 Feb 4.
We describe an algorithm to avoid steric violation (bumps) between bodies arranged in a hierarchy. The algorithm recursively directs the focus of a bump-detector towards the interactions of children whose parents are in collision. This has the effect of concentrating available computer resources towards maintaining good steric interactions in the region where bodies are colliding. The algorithm was implemented and tested under two programming environments: a graphical environment, OpenGL under Java3D, and a non-graphical environment in "C". The former used a built-in collision detection system whereas the latter used a simple algorithm devised previously for the interaction of "soft" bodies. This simpler system was found to run much faster (by 50-fold) even after allowing for time spent on graphical activity and was also better at preventing steric violations. With a hierarchy of three levels of 100, the non-graphical implementation was able to simulate a million atomic bodies for 100,000 steps in 12h on a laptop computer.
我们描述了一种算法,以避免层次结构中排列的物体之间的空间冲突(碰撞)。该算法递归地将碰撞探测器的焦点引导到发生碰撞的父母的孩子的相互作用上。这使得可用的计算机资源集中在保持碰撞区域中良好的空间相互作用上。该算法在两种编程环境下进行了实现和测试:图形环境,Java3D 下的 OpenGL,以及“C”中的非图形环境。前者使用了内置的碰撞检测系统,而后者使用了先前为“软”体的相互作用设计的简单算法。即使考虑到图形活动所花费的时间,这个更简单的系统也被发现运行速度快 50 倍,并且在防止空间冲突方面也更好。在具有三个层次结构的 100 个物体的情况下,非图形化的实现能够在笔记本电脑上模拟一百万个原子物体,在 12 小时内进行 100,000 步。