JavaSCript/HTML5 Equatorial Black Hole Simulator

Click For Summary

Discussion Overview

The discussion centers around a JavaScript/HTML5 simulator designed to model the behavior of equatorial black holes, particularly focusing on particle motion in the context of general relativity and Newtonian gravity. Participants explore the features of the simulator, its improvements over previous visual aids, and its potential applications for educational purposes.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • One participant describes the simulator's ability to handle spinning black holes and the effects of prograde and retrograde particle motion.
  • Another participant notes that the simulator provides quantitatively accurate results, although this is stated with some uncertainty.
  • There is mention of a side-by-side comparison with Newtonian gravity, which some participants find valuable.
  • The default configuration simulates Mercury's orbit around the Sun, with the ability to observe relativistic effects by adjusting the planet's distance from the Sun.
  • Participants express interest in reviewing the code for potential ideas and improvements, with one noting that the code is not particularly elegant but functional.
  • Updates to the simulator include a cleaned-up user interface, dual speed displays, and a JavaScript console debug toggle.

Areas of Agreement / Disagreement

Participants generally agree on the simulator's features and improvements, but there is no consensus on the aesthetic quality of the code or the extent of its quantitative accuracy.

Contextual Notes

Some limitations are acknowledged, such as the need for a specific screen resolution (1920x1080) and the potential for undetectable precession on human timescales.

Who May Find This Useful

Individuals interested in visualizations of black hole physics, JavaScript programming, and educational tools for understanding general relativity and Newtonian mechanics may find this discussion beneficial.

m4r35n357
Messages
657
Reaction score
148
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:
  • Like
Likes   Reactions: Markus Hanke, Greg Bernhardt and Borg
Technology news on Phys.org
Thanks for posting. I will have to look at the code later for ideas. :smile:
 
Borg said:
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 ;)
 
  • Like
Likes   Reactions: Borg
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.
 
[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