The idea of implementing a planetarium using a 3-D graphics system is an obvious one. We do it this way:
With WebGL, this can be done on a web page that anybody can access. With the three.js library, the 3-D part of the programming is relatively easy.
Most star data comes from the 2017 US Naval Observatory Table of Bright Stars.
We convert star magnitudes to brightness according to the formula in the Wikipedia Magnitude article. Converting the brightness number to screen values is a matter of judgement which depends on the value chosen for a reference brightness.
Star colors are derived from the B – V color index of the star using a rough method derived from the table in a Cornell Ask an Astronomer answer. I would be happy to know a better way of doing it. The Bright Stars Table also contains the V - I color index, so we could use a method that relies on both.
Most common names of stars come from the Wikipedia Proper Names of Stars article.
For planets other than the Sun (which is at the origin) and Moon, positions are computed from their Keplerian elements as given in Keplerian Elements for Approximate Positions of the Major Planets by E. M. Standish. Thanks to the miracle of the WebGL graphics engine, we only need to compute the heliocentric positions of the planets. The WebGL engine does the work of converting those to positions in the sky relative to the observer.
The main reason for computing planet positions instead of getting them from ephemerides is that we want positions in space rather than in the Earth's sky. A second is to avoid dependencies on other sites – the Planetarium is meant to run independently in a browser without needing an internet connection once it is loaded.
Although we do compute the right ascension and declination of planets to display in their tooltip description, we actually set their position in the solar system using their heliocentric ecliptic coordinates, then tilt the solar system by the J2000 obliquity of the Earth, then tilt the Earth back so that its north pole points to the celestial north pole.
Data on radii, oblateness, and rotation rates of planets are taken from NASA planetary fact sheets.
Planet textures come from various sources.
I don't have any information about where longitude zero is for planets other than earth or how rotated they are at any given moment, so I have determined that arbitrarily. Longitude 0 is the left edge of the image I have used for the planet and I have used 0 as the rotation of the planet at the start of the J2000 Julian epoch.