CodingTrain / CodingTrain/Suggestion-Box

Black hole event horizon demo in honor of Stephen Hawking

Aperta
#896 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
570
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

In honor of Stephen Hawking, here is a black hole event horizon demo that is a modified version of the "Slingshot with gravity" coding activity from the STEMcoding project:

http://www.physics.ohio-state.edu/~orban/physics_coding/gravity/gravity.html

In the modified version, the speed of the object cannot exceed the speed of light (c) which in this case is set to 50.0. Here is the code:

http://alpha.editor.p5js.org/ChrisOrban/sketches/rk7BNQwKz

If you change the initial position of the object to be just inside the event horizon (x = 445, y = 250 for example) you'll notice that the distance from the black hole never gets larger than some value, but if you change the initial position to be just outside the event horizon (x = 465, y = 250) then the position keeps increasing over time because the object is unbound from the system. In this way, the event horizon is a kind of point of no return because not even light can fully escape the system.

Just for fun, you can also click and drag the mouse to sling an object in some direction at the speed of light.

There are better ways of writing gravity codes with more accurate integration of trajectories, but this simple implementation still shows the basic features of the event horizon. Enjoy!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia esaminando l’attività sulla gravità di STEMcoding collegata e lo sketch p5.js, incluso il comportamento dell’orizzonte degli eventi e il vincolo della velocità della luce descritti qui. L’issue non indica file del repository, test o un punto di ingresso per l’implementazione; per considerarlo completato sarebbe necessario concordare l’ambito per adottarlo come argomento o demo di Coding Train.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
content
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.