celestial sphere

 From:  bemfarmer
7559.9 
The celestial math is becoming slightly less opaque.
Some references and thoughts:
http://www.heavens-above.com/constellation.aspx?lat=0&lng=0&loc=Unspecified&alt=0&tz=UCT
https://en.wikipedia.org/wiki/Spherical_coordinate_system
https://en.wikipedia.org/wiki/Celestial_coordinate_system
https://en.wikipedia.org/wiki/Celestial_sphere#Celestial_coordinate_systems

https://en.wikipedia.org/wiki/Equatorial_coordinate_system
https://en.wikipedia.org/wiki/Right_ascension
https://en.wikipedia.org/wiki/Declination

Previously in scripts, points have been plotted in Moi, using spherical coordinates converted to (x, y, z).

Star locations are available in Right Ascension and Declination, Equatorial coordinates.

Right Ascension:
RA is measured in time units of hours, minutes, and seconds.
Convert RA to degrees using 360 degrees = 24 hours.
24 h = 360 deg
1 h = 15 deg, 1 m = 15', 1 s = 15"
1 deg = 4 m, 1' = 4 s
Then convert to radians, 2PI = 360 degrees.
This radian angle is the same as Theta in spherical coordinates, mathematics version, not physics.

Declination:
Dec is measured in angles, i.e. degrees, minutes, seconds.
Dec must be converted to angle Phi in spherical coordinates.
Note that for a negative declination, minutes and seconds are ALSO negative.
Angle Phi in spherical coordinates is equal to (90 degrees minus Dec) [where Dec may be negative.]
Example: Declination of -10 degrees yields Phi of (90 - (-10)) = 100 degrees in spherical coordinates.
Convert Phi to radians.

{Note: Max kept dec, instead of converting to phi, so sin and cos(phi = dec) would be swapped}

Radius of the celestial globe, Theta, and Phi, are converted to (x,y,z) point in Moi:
var x = r * Math.sin(phi) * Math.cos(theta);
var y = r * Math.sin(phi) * Math.sin(theta);
var z = r * Math.cos(phi);

return moi.vectorMath.createPoint( x, y, z );

Point could be made into a small color circle for a large/bright appearing star. What diameter?
Add lines (great circles) connecting constellation stars.
Vernal equinox, time of day...

- Brian

http://spider.seds.org/spider/ScholarX/coords.html

EDITED: 22 Aug 2015 by BEMFARMER