VIS- und Uni-Logo
Blindenversion home uni uni suche suche sitemap sitemap kontakt kontakt
unilogo Universität Stuttgart
Institut für Visualisierung und Interaktive Systeme

Thomas Müller


Interactive visualization of a thin disc around a Schwarzschild black hole

Thomas Müller(1) and Jörg Frauendiener(2)

In a first course in general relativity, the Schwarzschild spacetime is the most discussed analytic solution to Einstein's field equations. Unfortunately, there is rarely enough time to study the optical consequences of the bending of light for some advanced examples. In this paper, we present how the visual appearance of a thin disc around a Schwarzschild black hole can be determined interactively by means of an analytic solution to the geodesic equation processed on current high-performance graphical processing units. This approach can, in principle, be customized for any other thin disc in a spacetime with geodesics given in closed form. The interactive visualization discussed here can be used either in a first course in general relativity for demonstration purposes only or as a thesis for an enthusiastic student in an advanced course with some basic knowledge of OpenGL and a programming language.

The accompanying paper is published in the European Journal of Physics 33, 955-963 (2012).

Back to main page

Click on an image for a higher resolution:

The source code is available here:
linux archive md5sum: 4f9daaa92a9f15253374d2e2c05bac7d
windows archive md5sum: 4298a13ef323d55cff301d8494736df3

Plese note that you need Qt 4.7 or higher installed and a graphics board that supports OpenGL 2.0 and GLSL.

  1. Start qtCreator.
  2. Open "" (linux) or "" (windows) project.
    If you have Qt 4.8, then select 'Desktop' as target setup.
  3. Double-click on "" file, adjust the line "TOP_DIR", and save the file.
  4. Press 'Ctrl+5' brings you to the "Build Settings". Here, uncheck "Shadow build".
  5. Press 'Ctrl+B' to build project.
  6. Start the program with "Ctrl-R'.

Mouse handling
  • Left mouse button pressed -> change inclination.
  • Right mouse button pressed -> change observer distance.
   WebGL application     
If you have a browser that can handle WebGL context and you have a graphics board that supports at least OpenGL2.0/GLSL1.10, then try this link.

Details about WebGL can be found at
(1) Visualisierungsinstitut der Universität Stuttgart (VISUS)
Allmandring 19
70569 Stuttgart, Germany

(2) Department of Mathematics & Statistics, University of Otago
P.O. Box 56
Dunedin 9010, New Zealand

All contents copyright © 2012, Thomas Müller
All rights reserved.