Inspired by the recent image of the Powehi m87 black hole from the Event Horizon Telescope, I visualize the behavior or light (photons) following the path of spacetime around the black hole in p5.js. Code: thecodingtrain.com/challenges...
p5.js Web Editor Sketches:
🕹️ Black Hole Visualization - Newtonian Granvitational Attraction: editor.p5js.org/codingtrain/s...
🕹️ Black Hole Visualization - Code with Relativistic Corrections: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge #143:...
🎥 Next video: • Coding Challenge #145:...
🎥 All videos: • Coding Challenges
References:
📓 Simulating a Black Hole!: www.asc.ohio-state.edu/orban....
🖌 How to draw a Black Hole: rantonels.github.io/starless/
📰 Astronomers Capture First Image of a Black Hole: eventhorizontelescope.org/
📓 Image of a Spherical Black Hole with Thin Accretion Disk: articles.adsabs.harvard.edu/cg...
Videos:
🎥 How to Understand the Image of a Black Hole: • How to Understand What...
🎥 Slingshot with Gravity!: • Slingshot with Gravity...
🔴 Coding Train Live 176: • Coding Train Live 176:...
Related Coding Challenges:
🚂 #7 Solar System (2D): • Coding Challenge #7: S...
🚂 #8 Solar System (3D): • Coding Challenge #8: S...
Timestamps:
0:00 Introducing today's topic: a black hole visualization
3:25 The elements in the black hole visualization
5:06 The event horizon
6:35 The accretion disk
8:35 What happens when light is traveling towards a black hole?
9:43 The theory of relativity
12:03 Let's Code!
13:52 Make a black hole object
16:57 Draw the accretion disk
18:49 Draw an unstable photon orbit
20:22 Create a photon class
23:25 Add velocity to the photons
25:46 Apply Newtonian gravitational attraction
31:36 Add a trail to the photon
38:17 Corrections to the code
40:14 Add the angle of velocity for the photon
0:00 Conclusion and suggestions for variations
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: thecodingtrain.com/discord
💖 Membership: kzitem.infojoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#blackholevisualization #eventhorizon #accretiondisk #javascript #p5js
Негізгі бет Coding Challenge 144: 2D Black Hole Visualization
Пікірлер: 271