Astronomy Code
Are you interested in writing your own astronomy software? The biggest hurdle is to convert the celestial
coordinates of sky objects (like stars, planets, galaxies, etc) into the x/y screen coordinates that your
computer understands. Here’s a code snippet calling such a function:
void somefunction() {
COORDS skyCoords;
/* convert coordinates for star Deneb in constellation Cygnus */
skyCoords = eqConvert(310.3579167, 45.28027778);
/* now turn on the pixel! */
SetPixel(hDc, skyCoords.x, skyCoords.y, RGB(255, 255, 255));
/* etc... */
}
You can write the code behind that snippet and perhaps build the next super astronomy app!
Read More »