# \[ANN\] SchwarzschildGeo.jl

**URL:** https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463
**Category:** Astro/Space
**Created:** [June 23, 2021, 8:14pm UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463 "2021-06-23T20:14:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![inokawazu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/inokawazu/32/25347_2.png) [@inokawazu](https://discourse.julialang.org/u/inokawazu)
#### Post date: [June 23, 2021, 8:14pm UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463/1 "2021-06-23T20:14:33Z")

</div>

Hello everyone. I just completed a small package to render a Schwarzschild Black hole with various backgrounds.

[https://github.com/inokawazu/SchwarzschildGeo.jl](https://github.com/inokawazu/SchwarzschildGeo.jl)

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [June 23, 2021, 9:39pm UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463/2 "2021-06-23T21:39:14Z")

</div>

@inokawazu, for those who are not astrophysicists but might be interested in physics, could you provide a reference to the equations you solve in your package and foremost, explain in simple terms what “rendering a Schwarzschild Black hole” means?  
Thank you.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [June 23, 2021, 11:17pm UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463/3 "2021-06-23T23:17:58Z")

</div>

I have a recall of the Schwarzschild radius of black holes (the distance at which light can no longer escape the grip of the black-hole), but why did you decided to add the _Geo_ suffix to the package name?

---

<div class="post-metadata">

### Author: ![inokawazu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/inokawazu/32/25347_2.png) [@inokawazu](https://discourse.julialang.org/u/inokawazu)
#### Post date: [June 25, 2021, 5:13am UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463/4 "2021-06-25T05:13:39Z")

</div>

Yeah, I have to admit it was partially from a lack of sleep and imagination. The idea was that Geo was short for Geodesic. I am always open to changing the name really.

---

<div class="post-metadata">

### Author: ![inokawazu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/inokawazu/32/25347_2.png) [@inokawazu](https://discourse.julialang.org/u/inokawazu)
#### Post date: [June 25, 2021, 5:23am UTC](https://discourse.julialang.org/t/ann-schwarzschildgeo-jl/63463/5 "2021-06-25T05:23:07Z")

</div>

The program essential answers the question “If I could replace the backdrop of the night sky with any old random picture (I used a picture of a galaxy), but there was a black hole in front of me, how would my view change?”

I said rendering a black hole, but I guess I should say ray tracing. After placing a “camera” somewhere outside the black hole, I use the geodesic equation to find the paths light takes depending on the initial direction from the “camera”. The package uses the final position of the light to determine the color of the pixel at a certain angle of view (which is associated with a pixel in the final image), I suppose. Also, if the ray of light falls into the black hole, that viewing angle is registered as black.
