drawmoon.fsp - Frink Server Pages highlighter

[Try drawmoon.fsp]

<%@ contentType="image/png" pageEncoding="raw" %>
<%
use ../sun.frink

g = new graphics
d = parseDate["$date UTC"]
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,eval[lat] degrees,eval[long] degrees,0,0,1,true]]
g.writeFormatTransparent["-", "png", 100, 100]
%>

[Try drawmoon.fsp]


Alan Eliasen was born 17596 days, 19 hours, 52 minutes ago.

Back to Frink Server Pages documentation.