Gravitational waves playground

An interactive visualization I created in 2018 with Swift and the Swift Playgrounds App.

In this Swift playground book you can make gravitational waves visible and control the visualization of this elusive radiation emitted by two inspiraling and merging black holes.


From README.md in the nilsleiffischer/gravitational-waves-playground GitHub repository:

Gravitational waves playground

In this Swift playground book you can make gravitational waves visible and control the visualization of this elusive radiation emitted by two inspiraling and merging black holes. It continues my series of interactive iPad simulations that started with my playground book on black holes.

  • Adjust the black hole masses:

    Images/masses.gif

  • Control visualization parameters, such as wave polarization and colors:

    Images/polarization.gif

  • Explore the visualization in three dimensions:

    Images/perspective.gif

Installation

  1. Download the Swift Playgrounds App on your iPad.
  2. Download the Gravitational Waves playground file on your iPad or Mac:
  • On your iPad: Select Open with “Playgrounds”.

    iPad download

  • Or on your Mac: AirDrop the file to your iPad and select Open with “Playgrounds”.

    AirDrop

Images/gallery_rgb.gif

Images/gallery_red.gif

Images/gallery_merger.gif

Simulated physics

  • The rendered field is the lowest-order metric perturbation in TT-gauge (or gravitational wave strain) or , with their distance scaling removed.
  • Selecting the option showFrequencyScaling is equivalent to visualizing the real or imaginary part of the Weyl scalar , depending on the chosen polarization.
  • The six colors are chosen from the normalized field values discretized into bins with edges .
  • The rotating spheres depict the relative Schwarzschild radius of the black holes, with an arbitary rescaling for visualization.
  • Orbital separation, time and wave propagation speed are also arbitrarily rescaled. Relative quantities are correct, however.
  • The ringdown is modeled as a simple quadrupolar oscillation with an exponential decay in amplitude for visualization purposes only.

About this project

I created this Swift playground book as part of my application for the Apple WWDC 2018 scholarship. It allows the reader to discover physics that is invisible to our eyes by simulating it on screen and by controlling its visual representation. The volume rendering of the gravitational field is accomplished by a library of Metal shaders that apply to a SceneKit scene. The shaders perform ray-tracing through three-dimensional space and integrate the gravitational field along each ray. By translating the field values to colors and blending them together along the ray, I create a visual representation of the gravitational field in space.

Copyright (c) 2018 Nils Leif Fischer