Skip to content

Ray tracing of a Schwarzschild black hole written entirely in TensorFlow.

License

Notifications You must be signed in to change notification settings

mikesha2/TensorGeodesic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorGeodesic

Ray tracing of a Schwarzschild black hole written entirely in TensorFlow.

Dependencies:

  • Python 3

  • TensorFlow 2.x

  • numpy

  • matplotlib

About

The Schwarzschild metric is currently implemented, with Christoffel symbols computed via automatic differentiation by tf.GradientTape.batch_jacobian. Geodesics from the observer are integrated using the classic fourth Runge-Kutta method (RK4).

Since the program is written in TensorFlow, it is fully differentiable and supports arbitrary CPU/GPU systems. In particular, it works on my M1 Max MacBook Pro.

Tested on TensorFlow 2.7.0, with Apple's tensorflow-metal 0.3.0 plugin (!!!)

About

Ray tracing of a Schwarzschild black hole written entirely in TensorFlow.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages