CodingTrain / CodingTrain/Suggestion-Box

Black hole event horizon demo in honor of Stephen Hawking

Abierto
#896 2 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Sin datos de lenguaje
Estrellas
570
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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!

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza revisando la actividad de gravedad de STEMcoding enlazada y el sketch de p5.js, incluido el comportamiento del horizonte de sucesos y la restricción de la velocidad de la luz descritos aquí. El issue no nombra archivos del repositorio, tests ni un punto de entrada para la implementación; para darlo por terminado sería necesario acordar el alcance de su adopción como tema o demo de Coding Train.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
content
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.