Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

Worst-case versus average case complexity of ray-shooting


This paper examines worst-case and average-case complexity measures of ray-shooting algorithms in order to find the answer to the question why computer graphics practitioners prefer heuristic methods to extensively studied worst-case optimal algorithms. It demonstrates that ray-shooting requires at least logarithmic time in the worst-case and discusses the strategies how to design such worst-case optimal algorithms. It also examines the lower-bounds of storage complexity of logarithmic-time algorithms and concludes that logarithmic time has very high price in terms of required storage. In order to find average-case measures, a probabilistic model of the scene is established. We conclude that algorithms optimized for the average-case are not only much simpler to implement, but have moderate storage requirement and can even run faster for the majority of problems.

This is a preview of subscription content, log in to check access.


  1. [1]

    Arvo, J., Kirk, D.: A survey of ray tracing acceleration techniques. In: An introduction to ray tracing (Glassner, A. S., ed.), pp. 201–262. London: Academic Press 1989.

  2. [2]

    Chazelle, B., Edelsbrunner, H., Guibas, L., Pollack, R., Sharir, M.: Lines in space — combinatorics, algorithms and applications. In: Proc. 21st ACM Symp. on Theory of Computing, pp. 382–393, 1989.

  3. [3]

    de Berg, M.: Efficient algorithms for ray shooting and hidden surface removal. PhD thesis, Rijksuniversiteit te Utrecht, 1992.

  4. [4]

    Dopkin, D. P., Lipton, R.: On the complexity of computations under varying set of primitives. J. Comput. Syst. Sci.18, 86–91 (1979).

  5. [5]

    Fujimoto, A., Takayuki, T., Kansei, I.: Arts: Accelerated ray-tracing system. IEEE Comput. Graphics Appl.6, 16–26 (1986).

  6. [6]

    Glassner, A. S. (ed.): An introduction to ray tracing. London: Academic Press 1989.

  7. [7]

    Glassner, A. S.: Space subdivision for fast ray tracing. IEEE Comput. Graphics Appl.4, 15–22 (1984).

  8. [8]

    Horváth, T., Márton, P., Risztics G., Szirmay-Kalos, L.: Ray coherence between sphere and a convex polyhedron. Comput. Graphics Forum2, 163–172 (1992).

  9. [9]

    Karlin, S., Taylor M. T.: A first course in stochastic processes. Academic Press, New York 1975.

  10. [10]

    Lamperti, J. F.: Stochastic processes. Berlin Heidelberg New York: Springer 1972.

  11. [11]

    Márton, G.: Acceleration of ray tracing via Voronoi-diagrams. In: Graphics gems V (Paeth, A.W., ed.), pp. 268–284. Boston: Academic Press 1995.

  12. [12]

    Márton, G.: Stochastic analysis of ray tracing algorithms. PhD thesis, Department of Process Control, Technical University of Budapest, Budapest, Hungary, 1995.

  13. [13]

    McKenna, M., O’Rourke, J.: Arrangements of lines in 3-space: a data structure with applications. In: Proc. 4th ACM Symp. on Computational Geometry, pp. 371–380, 1988.

  14. [14]

    Márton, G., Szirmay-Kalos, L.: On average-case complexity of ray tracing algorithms. In: Winter School of Computer Graphics ’95, pp. 187–196, Plzen, Czech Republic, 14–18 February 1995. University of West Bohemia.

  15. [15]

    Ohta, M., Maekawa, M.: Ray coherence theorem and constant time ray tracing algorithm. In: Computer Graphics 1987. Proc. CG International ’87 (Kunii, T. L., ed.), pp. 303–314.

  16. [16]

    Pellegrini, M.: Ray shooting on triangles in 3-space. Algorithmica9, 471–494 (1993).

  17. [17]

    Szirmay-Kalos, L. (ed.): Theory of three dimensional computer graphics. Akadémia Kiadó, Budapest, 1995.

  18. [18]

    Schmitt, A., Müller, H., Leister, W.: Ray tracing algorithms — theory and practice. In: Theoretical foundations of computer graphics and CAD (Earnshow, R. A., ed.), pp. 997–1030. Berlin, Heidelberg New York Tokyo: Springer Series, Vol. F40.

  19. [19]

    Sarnak, N., Tarjan, R. E.: Planar point location using persistent search trees. Comm. ACM29, 669–679 (1986).

  20. [20]

    Steel, J. M., Yao, A. C.: Lower bounds for algebraic decision trees. J. Algorithms3, 1–8 (1992).

  21. [21]

    Vegter, G.: The visibility complex. In: Proceedings of 9th Annual ACM Symp. on Computational Geometry, pp. 328–337, 1993.

Download references

Author information

Additional information

This work has been supported by the National Scientific Research Fund (OTKA), ref. No. F 015884 and The Austrian-Hungarian Action Fund, ref. No. 29ö4 and 32öu9.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Szirmay-Kalos, L., Márton, G. Worst-case versus average case complexity of ray-shooting. Computing 61, 103–131 (1998).

Download citation

Key words

  • Ray-shooting
  • complexity
  • stochastic analysis
  • computational geometry