Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I JavaSCript/HTML5 Equatorial Black Hole Simulator

  1. May 27, 2016 #1
    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: May 27, 2016
  2. jcsd
  3. May 27, 2016 #2

    Borg

    User Avatar
    Science Advisor
    Gold Member

    Thanks for posting. I will have to look at the code later for ideas. :smile:
     
  4. May 27, 2016 #3
    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 ;)
     
  5. May 27, 2016 #4

    Borg

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  6. Jun 3, 2016 #5
    [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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: JavaSCript/HTML5 Equatorial Black Hole Simulator
  1. Black hole ? (Replies: 2)

  2. Black hole (Replies: 2)

  3. Black hole (Replies: 284)

Loading...