<%
use ../
sun.frink
g = new graphics
d = parseDate["
$date
UTC"]
lat = eval[lat] degrees
long = eval[long] degrees
g.color[0.7, 0.7, 0.7] // Draw moon rotation axis
g.add[drawMoonRotationAxisRelativeToZenith[d, lat, long, 0 m, 0, 0, 1]]
g.color[.05,.05,.05] // Draw dark opaque moon disk
g.fillEllipseCenter[0,0,2,2]
g.color[.8,.8,.8] // Draw illuminated crescent.
g.add[drawMoonPolygonRelativeToZenith[d,lat,long,0,0,1,true]]
g.writeFormatTransparent["-", "png", 100, 100]
%>