Function that calculates coordinates of a polygon representing the shape of the illuminated fraction of the moon, as observed from Earth. The shape has a radius of 1 and is centred around (0, 0). It does not consider lunar eclipses.
Value
Returns a data.frame
with coordinates of a polygon representing
the shape of the illuminated fraction of the moon.
Examples
disc_illum <- lunar_phase_polygon(as.POSIXct("2025-04-01"))
plot(NA, NA, xlim = c(-1,1), ylim = c(-1, 1), asp = 1,
xlab = "x coord", ylab = "y coord")
polygon(disc_illum$x, disc_illum$y, col = "white")
disc_illum <- lunar_phase_polygon(as.POSIXct("2025-04-01"), 5, 50)
plot(NA, NA, xlim = c(-1,1), ylim = c(-1, 1), asp = 1,
xlab = "x coord", ylab = "y coord")
polygon(disc_illum$x, disc_illum$y, col = "white")