homepage/public/assets/post/hygsvg/full-en.html

60 lines
2.8 KiB
HTML

<p>
There are a couple of online services that offer the creation of a poster that contains the night's sky at a certain
point in time and space, but they all want to be paid handsomely. So, do it ourselves then! A quick search for input
data resulted in the following database:
</p>
<p>
<a target="_blank" href="https://github.com/astronexus/HYG-Database">https://github.com/astronexus/HYG-Database</a>
</p>
<p>
After a failed attempt at trying to understand the basics of astronomy I found a
<a target="_blank" href="http://jknight8.tripod.com/CelestialToAzEl.html#the%20source%20code">concise explanation</a>
of how you can calculate the visible night sky for a specific observer.
I implemented this algorithm, quick and dirty, in a Kotlin project (check out
<a target="_blank" href="https://github.com/CountZukula/hygsvg">my github repository</a> if you want to try it out).
The code outputs a vector image and I'm pretty pleased with the
result. As it's in vector format, it can be easily modified without loss of quality, meaning you can produce posters
of whichever size you desire.
</p>
<p>Below are some sample screenshots. I'm not rendering the full image here, to avoid a slow load of this page, but you
can download an example <a href="https://github.com/CountZukula/hygsvg/blob/master/example/stars.svg">here</a> to open
with your favorite image viewer.</p>
<div class="row">
<div class="col-md-12">
<figure class="figure">
<img src="/assets/post/hygsvg/img/stars1.png" class="figure-img img-fluid rounded"
alt="The whole hemisphere, projected on a circle.">
<figcaption class="figure-caption">The whole hemisphere, projected on a circle.</figcaption>
</figure>
</div>
<div class="col-md-12">
<figure class="figure">
<img src="/assets/post/hygsvg/img/stars3.png" class="figure-img img-fluid rounded"
alt="Slightly zoomed in ...">
<figcaption class="figure-caption">Slightly zoomed in ...</figcaption>
</figure>
</div>
<div class="col-md-12">
<figure class="figure">
<img src="/assets/post/hygsvg/img/stars2.png" class="figure-img img-fluid rounded"
alt="Zoomed in all the way!">
<figcaption class="figure-caption">Zoomed in all the way!</figcaption>
</figure>
</div>
</div>
<p>
Most parameters can be easily modified (size of the stars, colors, ...), either by changing some variables or
modifying the code (which should be relatively easy. It's currently possible to have the stars' colors correspond to
their actual class (if it's known in the database), meaning that the star is blue when hot, and reddish when cool.
Stars are also portrayed bigger when they are more bright in the sky, which made sense to me, as a non-astronomer.
</p>
<p>
Off to the printer!
</p>