moonDrawingTest.frink

Download or view moonDrawingTest.frink in plain text format


// Program to test moon drawing routines in sun.frink.

use sun.frink

n = now[]
lat = 39 deg North
long = 104 deg West

g = new graphics
gp = drawMoonPolygon[0, 0, 1, moonPositionAngleRelativeToZenith[n, lat, long], moonIlluminatedFraction[n], false]
g.add[gp]
g.show[]

//gp = drawMoonPolygon[0, 0, 1, 90 degrees, moonIlluminatedFraction[n], false]

g = new graphics

for a = 0 to 12
{
   angle = 30 degrees a
   for kf = 0 to 10
   {
      k = kf / 10
      gp = drawMoonPolygon[2.2 a, 2.2 kf, 1, angle, k, false]
      g.add[gp]
   }
   for kf = 9 to 0 step -1
   {
      k = (9 - kf) / 10
      gp = drawMoonPolygon[2.2 a, 2.2 kf + 24.2, 1, angle, k, false]
      g.add[gp]
   }
}

g.show[]


Download or view moonDrawingTest.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 19767 days, 14 hours, 16 minutes ago.