/** This draws the 2024 conjunction of Mars and Jupiter and Saturn for any given date. Try: frink drawMarsJupiter.frink "2024-08-14 09:00" for what is probably the closest approach for Denver, Colorado, USA. Try a few hours early for nighttime. */ use planets.frink lat = 40 deg North long = 105 deg West if length[ARGS] > 0 d = parseDate[ARGS@0] else d = now[] [maz, malt] = Planet.Mars.refractedAzimuthAltitude[d, lat, long] [jaz, jalt] = Planet.Jupiter.refractedAzimuthAltitude[d, lat, long] jrad = Planet.Jupiter.radiusAngle[d] mrad = Planet.Mars.radiusAngle[d] // Center on Jupiter (because it moves the slowest in the sky) g1 = Planet.drawJupiterMoonsRelativeToZenith[d, lat, long, (jaz-jaz) cos[-jalt], -(jalt-jalt), jrad, true, true] g2 = Planet.Mars.drawPolygonRelativeToZenith[d, lat, long, (maz-jaz) cos[-jalt], -(malt-jalt), mrad, true] g = new graphics g.add[g1] g.add[g2] g.invertGrays[].show[] g.invertGrays[].write["drawMarsJupiter.png", 2048, undef] g.invertGrays[].write["drawMarsJupiter.svg", 2048, undef] g.print[]