Skip to content

3levate/BlackHoleSimulation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlackHoleSimulation

Home screen

Simulation of the physics of a Schwarzschild black hole, or static black hole. A static black hole is a black hole that has neither electric charge nor angular momentum. Schwarzschild black holes are the simplest kind of black hole and only theorical since in reallity all things are moving at all times.

This project is based on the relativistic version of a JavaScript with p5.js implementation of the original code from the Coding Train Youtube channel 114th episode: 2D Black Hole Visualization (souce code).

Structures of a black hole

Black hole

  • Event horizon: the point from which no information can escape the black hole. It's radius is based on the black hole's mass with the origin on the center of the black hole (singularity) and given as follows:
Rs = (2 * G * m) / c^2
Rs -> Radius (of Schwarzschild)
G -> Universal gravitational constant
m -> Mass of the black hole
c -> Speed of light
  • Photon sphere: the radius in which light orbits the black hole. Calculated as
Photon Sphere = Rs * 1.5
  • Accretion disk: a disk of matter which orbits the black hole. Formulae:
Accretion Disk = Rs * 3

Features

Options screen

  • Uses a simplified version of the real physics involved on the calculations.
  • Simulates attraction on:
    • Asteroid
    • Planet
    • Star
    • White Dwarf
    • Photons

Release

Stable version: 3.0.0

Source

Coding Challenge #144 - 2D Black Hole Visualization

Know more:

Portuguese:

Extras:

Portuguese:

About

Simulation of the physics of a black hole.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.4%
  • CSS 3.6%