All astronomy yearbooks display some form of "hourglass" diagram, that shows the times when Sun, Moon and planets rise and set.
Finding the times for sunrise and sunset is easy enough, drawing the lines too. Coloring is more involved, but paper.js greatly helps. Next steps: add planets..
This is an attempt to reproduce Guy Ottewell's Moon distance diagram.
The horizontal axis represents the distance to the Moon, in earth-radii, the vertical axis is the selected period, with dates for new and full Moons.
This list of Deep Sky Objects is taken from the PP3 project. I extracted all Messier objects, and all NGC brighter than magnitude 15.
Both HTML5 canvas and SVG have a "gradient" construct. This is an attempt to represent a sunrise with a circular gradient.
Once we know the phase from the date, we draw one little moon for each day of the year.
The phase angle of the Moon is defined as zero for a Full Moon, positive for the waning phase, -180° for a New Moon, and negative for the waxing phase.
We draw a disk, a limb (half-circle) and a terminator (half-ellipse), and color the areas according to the phase.
The next step is to compute the phase from the date. As always, my reference is Jean Meeus' book Astronomical Algorithms.
Sky Map using d3.js
To print detailed maps, I need SVG rather than screen bitmaps, and stars down to magnitude 8 or 9, therefore on-the-fly loading and unloading of star data when panning across the sky.
Displaying a map of the sky at high resolution requires loading and unloading files corresponding to sections of the sky (tiles). Jason Davies has a very efficient solution with a quadtree, but I think quadtrees would not work near the poles with stereographic projection. So I use a simple algorithm that works with one zoom level only (can probably be extended to 2 or 3). I load a collection of tiles (as JSON objects) that represent the files with detailed star data, and I use use the bounding box of each polygon to determine which one intersect the viewing rectangle.
I get the orbital elements of asteroids and comets from the Minor Planet Center. For asteroids, I use the file called "Soft00Bright.txt", which lists the brightest minor planets at opposition this year. For comets, Soft00Cmt.txt.
Solar System with 2 comets
Click to zoom and rotate around the Sun.
I use the z-coordinate of the lines at each intersection to decide which one to draw in front of the other.
Next steps are to add a user interface that allows to choose image rendering parameters, and to load asteroids and comets orbital elements from a web site (not sure which one).