JavaSCript/HTML5 Equatorial Black Hole Simulator

  • #1
654
148

Main Question or Discussion Point

Not to be confused with the full 3/4D one that I was plugging a while ago . . . this HTML5 canvas/JavaScript page was inspired by an old visual aid (requires Java plugin) that I found lacking in several areas. The improvements that I have made include:
  • Handles spinning black holes, with prograde and retrograde particle motion
  • Quantitatively accurate results to the best of my knowledge
  • More configurable and interactive than the applet
  • Side by side comparison with Newtonian gravity (as far as possible)
The default configuration is an approximation to Mercury's orbit around the Sun. Precession is virtually undetectable on human timescales, but you can transport the planet closer to the sun to see relativistic effects come into play. Needs 1920x1080.

Thread marked as intermediate for those who want to study the code, but should be usable by anyone . . . Enjoy!
 
Last edited:

Answers and Replies

  • #2
Borg
Science Advisor
Gold Member
1,871
2,267
Thanks for posting. I will have to look at the code later for ideas. :smile:
 
  • #3
654
148
Thanks for posting. I will have to look at the code later for ideas. :smile:
Here is the GitHub link if you want to do this. The code is not what I'd call pretty, but it is slightly encapsulated, and runs in "strict" mode ;)
 
  • #4
Borg
Science Advisor
Gold Member
1,871
2,267
Thanks for the direct link. I saw that it was probably on github based on the URL. I'm always looking for new and interesting visualizations in Java and Javascript. Now, all I need is the time to look it over.
 
  • #5
654
148
[Updated: Cleaned up UI a bit, added dual speed displays and JS console debug toggle]

This HTML5 canvas/JavaScript page was inspired by an old visual aid (requires Java plugin) that I found lacking in several areas. The improvements that I have made include:
  • Handles spinning black holes, with prograde and retrograde particle motion
  • Quantitatively accurate results to the best of my knowledge
  • Side by side comparison with Newtonian gravity (as far as possible)
  • Single page interface, keyboard operable
The default configuration is an approximation to Mercury's orbit around the Sun. Precession is virtually undetectable on human timescales, but you can transport the planet closer to the sun to see relativistic effects come into play. Needs 1920x1080.

GitHub
 

Related Threads on JavaSCript/HTML5 Equatorial Black Hole Simulator

Replies
4
Views
5K
Replies
3
Views
2K
Replies
3
Views
962
  • Last Post
Replies
10
Views
4K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
3
Views
997
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
3
Views
3K
Replies
4
Views
744
Top