Git Product home page Git Product logo

ray-tracing's Introduction

Compton Scattering of Accretion Disk Emission off Black Hole Coronas in Curved Spacetime

Jack T. Dinsmore. November 20, 2022

Finished Dec 8, 2022

Physics 360 Final Project. Stanford University.

Description

The purpose of this project is to generate images of a simple black hole system consisting of an accretion disk and a Compton-scattering corona. Images are generated for the X-ray and optical bands by numerically integrating the equations of motion of light from the observer to the source under the laws of General Relativity. This technique is called ray-tracing.

For a description of the projects and a summary, see the writeup directory. For my final presentation, see presentation. Generated data is contained in the data directory and images of that data in the imager directory, along with the code required to generate images.

Finally, the code to actually do the ray-tracing is in the raytracer directory. It is flexible enough to use any relativistic metric, though Minkowsky, Schwarzschild, Kerr, and Morris-Thorne are already implemented. Likewise, other sources of light may be added to the code by modifying the source.rs and observer.rs files. The code is written in Rust โ€” a relativity recent programming language which is blazing fast and safer than any other alternative of the same performance (i.e., C and C++). The Rust documentation is phenomenal and you should definitely try the online Rust book if you would like to learn it. Experience with another type-safe language like C, C++, or Java is helpful, since Rust has a steep learning curve.

Usage

To run the code, in the raytracer directory run

cargo run --release

To generate images, in the imager directory run

python image.py

Changelog

Dec 7

Initial Commit. Original code moved to old directory. Added new code, data, and summary.

Dec 8

Gave talk. Need to change density profile of the disk and corona and possibly change the colormap and not do redshifting anymore.

ray-tracing's People

Contributors

jack-dinsmore avatar

Watchers

 avatar

Forkers

daedalus1235

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.