HTML/CSS JavaSCript/HTML5 Equatorial Black Hole Simulator

AI Thread Summary
The discussion centers around an HTML5 canvas and JavaScript visualization tool designed to simulate gravitational effects, particularly around spinning black holes. Key features include the ability to model prograde and retrograde particle motion, provide quantitatively accurate results, and offer a side-by-side comparison with Newtonian gravity. The default setting approximates Mercury's orbit, allowing users to observe relativistic effects by adjusting the planet's proximity to the Sun. The tool is designed for interactivity and is accessible through a single-page interface, with keyboard controls. The code is available on GitHub, noted for its encapsulation and adherence to strict mode, although it is described as not particularly elegant. The discussion also highlights ongoing improvements, such as a cleaner user interface and additional display options.
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 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 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
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top