The Visual Computer

, Volume 35, Issue 11, pp 1503–1515 | Cite as

An enhanced sweep and prune algorithm for multi-body continuous collision detection

  • Binbin Qi
  • Mingyong PangEmail author
Original Article


Multi-body collision detection is a key and important technology in societies of computer graphics, system simulation, virtual reality, etc. and has been widely used in various graphics applications. To deal with the collision detection problem in large-scale multi-body scenes, we in this paper proposed a robust and efficient algorithm based on the kinetic “sweep and prune” technique and the event-driven mechanism. Our algorithm first culls redundant detection calculations in finding object pairs that do not collide in the scene with very large number of moving objects and then automatically generates events to predict the object collisions, which probably take place in near future. All the events are pushed into an optimized priority queue to drive the proposed algorithm. By introducing a hybrid bounding box hierarchy in the event processing process, the algorithm can detect the positions where the object pairs collide. Based on our finding that event blocking is an important factor affecting the robustness of the algorithm, we further propose several techniques to alarm blockings to be occurred or relieve the system from blocking state. Experimental results show that our algorithm has good stability and robustness, and it can improve the operating efficiency of multi-body continuous collision detections in an efficient way.


Collision detection Event-driven Multi-body collision Event blocking Priority queue Virtual reality 



The work in this paper was supported by the National Natural Science Foundation of China [Grand No. 41631175], the Key Project of the Ministry of Education for the 13th Five-year Plan of National Education Science of China [Grand No. DCA170302], the Social Science Foundation of Jiangsu Province of China [Grand No. 15TQB005] and the Priority Academic Program Development of Jiangsu Higher Education Institutions of China.

Compliance with ethical standards

Conflict of interest

We declare that we have no conflict of interest.


  1. 1.
    Echegaray, G., Borro, D.: A methodology for optimal voxel size computation in collision detection algorithms for virtual reality. Virtual Real. 16(3), 205–213 (2012)CrossRefGoogle Scholar
  2. 2.
    Tang, M., Tong, R., Wang, Z., et al.: Fast and exact continuous collision detection with Bernstein sign classification. ACM Trans. Graph. 33(6), 186 (2014)CrossRefzbMATHGoogle Scholar
  3. 3.
    Tang, T.D.: Algorithms for collision detection and avoidance for five-axis NC machining: a state of the art review. Comput. Aided Des. 51, 1–17 (2014)CrossRefGoogle Scholar
  4. 4.
    Huh, S.B., Metaxas, D.N.: A collision resolution algorithm for clump-free fast moving clothJ]. Vis. Comput. 22(6), 434–444 (2006)CrossRefGoogle Scholar
  5. 5.
    Dobkin, D.P., Kirkpatrick, D.G.: A linear algorithm for determining the separation of convex polyhedra. J. Algorithms 6(3), 381–392 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Agarwal, P.K., Kreveld, V.M., Overmars, M.: Intersection queries in curved objects. J. Algorithms 15(2), 229–266 (1993)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Han, D., Nie, H., Chen, J., et al.: Dynamic obstacle avoidance for manipulators using distance calculation and discrete detection. Robot. Comput. Integr. Manuf.g 49, 98–104 (2018)CrossRefGoogle Scholar
  8. 8.
    Wong, T.H., Leach, G., Zambetta, F.: Virtual subdivision for GPU based collision detection of deformable objects using a uniform grid. Vis. Comput. 28(6–8), 829–838 (2012)CrossRefGoogle Scholar
  9. 9.
    Wong, S.K., Baciu, G.: Continuous collision detection for deformable objects using permissible clusters. Vis. Comput. 31(4), 377–389 (2015)CrossRefGoogle Scholar
  10. 10.
    Tropp, O., Tal, A., Shimshoni, I., et al.: Temporal coherence in bounding volume hierarchies for collision detection. Int. J. Shape Model. 12(02), 159–178 (2008)CrossRefzbMATHGoogle Scholar
  11. 11.
    Rasool, S., Sourin, A.: Real-time haptic interaction with RGBD video streams. Vis. Comput. 32(10), 1–11 (2016)CrossRefGoogle Scholar
  12. 12.
    Vemuri, B.C., Cao, Y., Chen, L.: Fast collision detection algorithms with applications to particle flow. Comput. Graph. Forum 17(2), 121–134 (1998)CrossRefGoogle Scholar
  13. 13.
    Wong, T.H., Leach, G., Zambetta, F.: An adaptive octree grid for GPU-based collision detection of deformable objects. Vis. Comput. 30(6–8), 729–738 (2014)CrossRefGoogle Scholar
  14. 14.
    Cohen, J.D., Lin, M.C., Manocha, D., et al.: I-COLLIDE: An interactive and exact collision detection system for large-scale environments. In: Proceedings of the 1995 Symposium on Interactive 3D Graphics. (pp. 189–196). ACM (1995)Google Scholar
  15. 15.
    Daniel, J.T., Samuel, R.B., Bryan, M.W.: Efficient large-scale sweep and prune methods with AABB insertion and removal. In: 2009 IEEE Virtual Reality Conference. (pp. 191–198). IEEE (2009)Google Scholar
  16. 16.
    Liu, F., Harada, T., Lee, Y., et al.: Real-time collision culling of a million bodies on graphics processing units. ACM Trans. Graph. 29(6), 154 (2011)Google Scholar
  17. 17.
    Coming, D.S., Staadt, O.G.: Kinetic sweep and prune for multi-body continuous motion. Comput. Graph. 30(3), 439–449 (2006)CrossRefGoogle Scholar
  18. 18.
    Basch, J., Erickson, J., Guibas, L.J., et al.: Kinetic collision detection between two simple polygons. Comput. Geom. 27(3), 211–235 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Jia, X.C., Choi, Y.K., Mourrain, B., et al.: An algebraic approach to continuous collision detection for ellipsoids. Comput. Aided Geom. Des. 28(3), 164–176 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Corrales, J.A., Candelas, F.A., Torres, F.: Safe human-robot interaction based on dynamic sphere-swept line bounding volumes. Robot. Comput. Integr. Manuf. 27(1), 177–185 (2011)CrossRefGoogle Scholar
  21. 21.
    Weller, R.: Kinetic data structures for collision detection. In: Ferre, M., Ernst, M.O., Wing, A. (eds) New Geometric Data Structures for Collision Detection and Haptics. Springer (2013)Google Scholar
  22. 22.
    Zhang, X., Lee, M., Kim, Y.J.: Interactive continuous collision detection for non-convex polyhedra. Vis. Comput. 22(9–11), 749–760 (2006)CrossRefGoogle Scholar
  23. 23.
    Lee, Y., Behar, E., Lien, J.M., et al.: Continuous penetration depth computation for rigid models using dynamic Minkowski sums. Comput. Aided Des. 78(C), 14–25 (2016)MathSciNetCrossRefGoogle Scholar
  24. 24.
    Bridson, R., Fedkiw, R., Anderson, J.: Robust treatment of collisions, contact and friction for cloth animation. ACM Trans. Graph. 21(3), 594–603 (2002)CrossRefGoogle Scholar
  25. 25.
    Zhang, X., Redon, S., Lee, M., et al.: Continuous collision detection for articulated models using Taylor models and temporal culling. ACM Trans. Graph. 26(3), 15 (2007)CrossRefGoogle Scholar
  26. 26.
    Oh, S., Hwang, S.: A GJK based real-time collision detection algorithm for moving objects. In: Advances in Cognitive Neurodynamics ICCN 2007. (pp. 817–820). Springer (2008)Google Scholar
  27. 27.
    Montanari, M., Petrinic, N., Barbieri, E.: Improving the GJK algorithm for faster and more reliable distance queries between convex objects. ACM Trans. Graph. 36(3), 1–17 (2017)CrossRefGoogle Scholar
  28. 28.
    Weller, R., Debowski, N., Zachmann, G.: kDet: Parallel constant time collision detection for polygonal objects. Comput. Graph. Forum 36(2), 131–141 (2017)CrossRefGoogle Scholar
  29. 29.
    Wang, X.L., Tang, M., Manocha, D., et al.: Efficient BVH-based collision detection scheme with ordering and restructuring. Comput. Graph. Forum 37(2), 227–237 (2018)CrossRefGoogle Scholar
  30. 30.
    Gottschalk, S., Lin, M.C., Manocha, D.: OBBTree: A hierarchical structure for rapid interference detection. In: Proceedings of the 23rd Annual Conference on Computer Graphics and Interactive Techniques. pp. 171–180. ACM (1996)Google Scholar
  31. 31.
    Wei, Y.M., Wu, Y.Q., Shi, J.Y.: Research on fixed direction hull bounding volume in collision detection. J. Softw. 12(7), 1056–1063 (2001)Google Scholar
  32. 32.
    Tang, T.D.: Algorithms for collision detection and avoidance for five-axis NC machining: a state of the art review. Comput. Aided Des. 51(6), 1–17 (2014)CrossRefGoogle Scholar
  33. 33.
    Tu, C., Yu, L.: Research on collision detection algorithm based on AABB-OBB bounding volume. In: International Workshop on Education Technology and Computer Science. pp. 331–333. IEEE Computer Society (2009)Google Scholar
  34. 34.
    Chang, J.W., Wang, W., Kim, M.S.: Efficient collision detection using a dual OBB-sphere bounding volume hierarchy. Comput. Aided Des. 42(1), 50–57 (2010)CrossRefGoogle Scholar
  35. 35.
    Capannini, G., Larsson, T.: Adaptive Collision culling for massive simulations by a parallel and context-aware sweep and prune algorithm. IEEE Trans. Vis. Comput. Graph. 24(7), 2064–2077 (2018)CrossRefGoogle Scholar
  36. 36.
    Coming, D.S., Staadt, O.G.: Velocity-aligned discrete oriented polytopes for dynamic collision detection. IEEE Trans. Vis. Comput. Graph. 14(1), 1–12 (2008)CrossRefGoogle Scholar
  37. 37.
    Moser, H., Schmid, U.: Reconciling fault-tolerant distributed algorithms and real-time computing. Distrib. Comput. 27(3), 203–230 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  38. 38.
    Tarjan, R.E.: Amortized computational complexity. SIAM J. Algebraic Discrete Methods 6(2), 306–318 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  39. 39.
    Fredman, M.L., Sedgewick, R.: The pairing heap: a new form of self-adjusting heap. Algorithmic 3(1), 111–129 (1986)MathSciNetCrossRefzbMATHGoogle Scholar
  40. 40.
    Pettie, S.: Towards a final analysis of pairing heaps. In: Proceedings of the 46th Annual IEEE Symposium on Foundations of Computer Science. pp. 174–183. IEEE (2005)Google Scholar
  41. 41.
    Paul, D.V., Pawar, J.D.: A binomial heap extractor for automatic keyword extraction. In: International Conference on Data Mining and Advanced Computing. pp. 113–121. IEEE (2016)Google Scholar
  42. 42.
    Baraff, D.: Interactive simulation of solid rigid bodies. IEEE Comput. Graph. Appl. 15(3), 63–75 (1995)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Institute of EduInfo Science and EngineeringNanjing Normal UniversityNanjingChina
  2. 2.School of Information ManagementNanjing UniversityNanjingChina

Personalised recommendations