I've looked online and I've found sources such as this paper on a lunar phase simulator as well as this article about lunar phases.

I'd like to be able to model the area of the lunar disk which is shaded with respect to the moon's angle or time of the lunar month and I'm not sure how to go about doing this. In essence, I would like to be able to find a function f(x) where I can feed in a value such as 0 (meaning 0 days since the start of the lunar month) and I'd be able to get an output like 0 since it's a new moon. Likewise, f(14ish) should be new moon or fig 5 on the image below and so I'd get a value close to 1.

I'm focused a bit more on the maths rather than real values, so I'm willing to make assumptions such as the moon and earth being perfect spheres for the sake of the model.

moon phases

I know there's a lot of maths involved and I'm going to have to do some integration, but I'd appreciate it if someone could point me to sources to get started on this since the papers I'm finding are either children's lunar phase worksheets or not related to this topic.

  • 2
    $\begingroup$ Welcome to Stack Exchange! I think you need to clarify your question because the obvious answer to “the surface area of the moon which is shaded” is “50% at all times”. Because you talk about moon phases I think you probably mean “the proportion of the moon’s disc which is shaded”. That could yield some interesting answers. But people are reluctant to spend time answering a question when they have to guess what is being asked, so could you edit your question, please? $\endgroup$ Dec 15, 2020 at 8:26
  • 1
    $\begingroup$ I've made changes to the question to better represent what I'm asking, thanks for the advice! $\endgroup$
    – akshat
    Dec 16, 2020 at 0:53

1 Answer 1


If I interpret your question correctly, you want to calculate the area of the moon disk as seen from Earth which is shaded, correct? You might then be looking for a way to calculate the position of the moon's terminator line. For this, you might have to dive into celestrial mechanics, more specifically about the ephemerides of moon and Earth. This is necessary as you have to calculate the position of Earth and moon in an appropriate sun-centered coordinate system.

In a basic course on celestial mechanics this does not necessarily occur since the priority there is to calculate the stability of the orbit of objects.

Related questions and answers


  • $\begingroup$ I've found this really useful, thank you for the help. I've also updated my question to better reflect what I'm going for, so you have a better understanding of what I'm asking. $\endgroup$
    – akshat
    Dec 16, 2020 at 0:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .