drawJupiterSaturn.frink

View or download drawJupiterSaturn.frink in plain text format


/** This draws the great 2020 conjunction of Jupiter and Saturn for any given
    date.  Try:

    frink drawJupiterSaturn.frink "2020-12-21 06:00 PM"

    for what is probably the closest visible nighttime approach for
    Denver, Colorado, USA
*/


use planets.frink
lat =   40 deg North
long = 105 deg West

if length[ARGS] > 0
   d = parseDate[ARGS@0]
else
   d = now[]

[jaz, jalt] = Planet.Jupiter.refractedAzimuthAltitude[d, lat, long]
[saz, salt] = Planet.Saturn.refractedAzimuthAltitude[d, lat, long]

jrad = Planet.Jupiter.radiusAngle[d]
srad = Planet.Saturn.radiusAngle[d]

// Center on Saturn (because it moves the slowest in the sky)
g1 = Planet.drawSaturnRelativeToZenith[d, lat, long, (saz-saz) cos[-salt], -(salt-salt), srad, true, true]
g2 = Planet.drawJupiterMoonsRelativeToZenith[d, lat, long, (jaz-saz) cos[-salt], -(jalt-salt), jrad, true, true]

g = new graphics
g.add[g1]
g.add[g2]
g.invertGrays[].show[]
g.print[]


View or download drawJupiterSaturn.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 18666 days, 1 hours, 1 minutes ago.