0
  1. Calculating the phase of the Moon is pretty straightforward. I'm not asking that. The moon actually changes its phase-angle and illumination because of librations and other factors. (see here for the moon phases for 2011: https://www.youtube.com/watch?v=3f_21N3wcX8)

  2. Meeus in Astronomical Algorithms (pgs. 98-99 Ch. 14 and pgs. 345-357, chs. 48-50), gives formulae for the phase, illumination, phase-angle and and the parallactic angle to show the position and illumination of the moon. The problem I have is implementation in php. How to translate angles in order to achieve the relevant filled-in arc, together with a dark circle to create the appearance of the moon correctly as it would appear in the night sky.

  3. I am aware of imagearc ( resource $image , int $cx , int $cy , int $width , int $height , int $start , int $end , int $color) which obviously creates the arc, with the relevant angle.

To create the horns, or the illusion of a crescent, can one superimpose two arcs on top of each other? The other question is can this be used in tandem with a blur, shadow and actual moon image to make it more realistic? Or am I better off implementing this in CSS? Are there any implementations in code that draws the actual moon as determined by the Phase and Paralletic angles?

Danny F
  • 392
  • 8
  • 21
  • You're asking to programmatically draw a moon using [tag:gd]…? Please clarify what you already have and what exactly you're stuck on. – deceze May 21 '18 at 13:32
  • programmatically draw a moon with the data from meeus: that is angle, illumination, position. The question is the best way of implementing it, and can you superimpose two images ontop of each other in imagearc? – Danny F May 27 '18 at 22:31

0 Answers0