drawPlanets.frink

View or download drawPlanets.frink in plain text format

// Draws all the planets and their phase angles for a moment in time.

use planets.frink
d=now[]

lat=40 deg North
long=105 deg West

g=new graphics

y = 0 deg
x = 0 deg
spacing = 10 arcsec

for planet = Planet.planetsMinusEarth
{
   rad= Planet.Earth.radiusAngle[d, planet]
   // println[planet.name + " " + (2 rad->"arcsec")]
   g.color[randomFloat[0,1], randomFloat[0,1], randomFloat[0,1]]
   if planet != Planet.Saturn
      g.add[planet.drawPolygonRelativeToZenith[d, lat, long, x, y + rad + spacing, rad, true]]
   else
      g.add[planet.drawSaturnRelativeToZenith[d, lat, long, x, y+rad+spacing, rad]]
   
   y = y + 2 rad + spacing
}

g.invertGrays[].show[]


View or download drawPlanets.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 18659 days, 14 hours, 15 minutes ago.