Black holes

A series of interactive simulations I created in 2017 with Swift and the Swift Playgrounds App.

In this Swift playground book you’ll explore the physics of black holes in Albert Einstein’s theory of general relativity with three interactive simulations on your iPad. Discover the possible trajectories of test particles around a Schwarzschild source, explore the optical effects that occur when a massive object lenses a background light source and watch two black holes merge to hear the gravitational waves they produce in the process.


From README.md in the nilsleiffischer/black-holes-playground GitHub repository:

Black holes in general relativity

In this Swift playground book you’ll explore the physics of black holes in Albert Einstein’s theory of general relativity with three interactive simulations on your iPad.

  • Schwarzschild trajectories: Explore the possible trajectories of test particles around a spherically symmetric source.

    Schwarzschild trajectories

  • Light deflection: Discover optical effects that occur when a massive object lenses a background light source.

    Gravitational lensing

  • Gravitational waves: Watch two black holes merge and hear the gravitational waves they produce in the process.

    Gravitational waves

Installation

  1. Download the Swift Playgrounds App on your iPad.
  2. Download the Black holes playground 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

About this project

I created this Swift playground book as part of my application for the Apple WWDC 2017 scholarship. For all three simulations I modelled the physics of general relativity in Swift data structures and used the SpriteKit and UIKit frameworks of the iOS platform to visualise the dynamics on screen. To make the educational material engaging for the reader, I employ features of the iOS device such as touch input, motion control and audio feedback that encourage exploration of the scientific phenomena.

Copyright (c) 2017 Nils Leif Fischer