CodingTrain / CodingTrain/Suggestion-Box
Black hole event horizon demo in honor of Stephen Hawking
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 570
- Forks
- 85
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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!
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par examiner l’activité de gravité STEMcoding liée et le sketch p5.js, y compris le comportement de l’horizon des événements et la contrainte de la vitesse de la lumière décrits ici. L’issue ne nomme aucun fichier du dépôt, test ni point d’entrée pour l’implémentation ; sa finalisation nécessiterait de convenir du périmètre d’adoption de cette activité comme sujet ou démo de Coding Train.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- content
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100