use sun.frink // This program graphically draws the size (and phase) of the moon's closest // point each day for many years. It sort of debunks the idea that the // so-called "supermoon" is really special at all. g = new graphics daynum = 0 lat = 40 degrees North long = 105 degrees West // Moons per row. Lunar month is ~29.53 days so you can change this to 29 or 30 perline = (lunarmonth/day) start = beginningOfYear[now[]] end = beginningOfYearPlus[now[], 3] for a = start to end step day { interval = new interval[a, a + 1 day] r = moonRadiusAngle[interval] closest = supremum[r] // Use this line instead to just draw the size of the moon and not its phase. // g.fillEllipseCenter[x mod perline, x div perline, 200 closest, 200 closest] g.add[drawMoonPolygonRelativeToZenith[a+12 hours, lat, long, daynum mod perline, daynum div perline, 100 closest, true]] daynum = daynum + 1 } //g.font["SansSerif", "italic+bold", .95] //g.text["A year of moons and another year of Sky & Telescope!", 28/2, 14] // Comment this next line out to save printer ink. g=g.invertGrays[] g.show[] g.write["moons.svg",1024,undef] g.write["moons.png",1024,undef] //g.printTiled[2,1]