<p>I was finally able to crack this.</p>
<p><code>i</code> = illumination</p>
<p><code>p</code> = rotation of the &quot;mask&quot; (i.e. shadow) = bright limb angle + π/2 - parallactic angle</p>
<p><code>r</code> = rotation of the moon = position angle of axis - parallactic angle</p>
<p>(all angles in radians)</p>
<p>Computational sources for programmers:</p>
<ul>
<li>Java: <a href="https://bitbucket.org/talonsoalbi/sunmooncalculator/src/master/SunMoonCalculator.java" rel="nofollow noreferrer">https://bitbucket.org/talonsoalbi/sunmooncalculator/src/master/SunMoonCalculator.java</a></li>
<li>C++: <a href="https://github.com/ThingPulse/esp8266-weather-station/blob/master/src/SunMoonCalc.cpp" rel="nofollow noreferrer">https://github.com/ThingPulse/esp8266-weather-station/blob/master/src/SunMoonCalc.cpp</a></li>
<li>Python: <a href="https://github.com/bokepasa/SunMoonCalculator" rel="nofollow noreferrer">https://github.com/bokepasa/SunMoonCalculator</a></li>
</ul>

CC BY-SA 4.0
2021-12-27T22:06:25.000Z
2021-12-27T22:06:25.000Z
Marcel Stör
<p>Yes, the are angles in radians. With &quot;i=0.5&quot; to make things clearer:</p>
<ul>
<li><span class="math-container">$p=0$</span> is the right half illuminated</li>
<li><span class="math-container">$p=\pi/2=1.57$</span> is top half illuminated  (rotated anticlockwise by 90 degrees)</li>
<li><span class="math-container">$p=\pi=3.14$</span> is left half illuminated  (rotated 180 degrees)</li>
</ul>
<p>and so on.</p>
<p>The r parameter is the rotation of the moon, so <span class="math-container">$r=0$</span> is &quot;lunar north up&quot; <span class="math-container">$r=pi/2$</span> is rotated anticlockwise by 90 degrees.</p>

CC BY-SA 4.0
2020-11-14T21:46:10.040Z
Thank you for explanations. I use a piece of software that provides a plethora of moon (phase) properties for a given timestamp and location. "axis position angle", "bright limb angle" and "paralactic angle" don't mean much to me yet but I will analyze them and try to understand which ones relate to the above.
Marcel Stör
CC BY-SA 4.0
2020-11-13T21:57:22.783Z
2020-11-13T21:57:22.783Z
James K
<p>Still learning, thinking - and failing - about the moon.</p>
<p>timeanddate.com has this cute and dynamic moon sketch at e.g. <a href="https://www.timeanddate.com/moon/uk/london" rel="nofollow noreferrer">https://www.timeanddate.com/moon/uk/london</a></p>
<p><a href="https://i.sstatic.net/O6wEX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/O6wEX.png" alt="enter image description here" /></a></p>
<p>They generate this based on three parameters that they call <code>i</code>, <code>p</code> and <code>r</code>. The above image is the result of invoking this: <a href="https://www.timeanddate.com/scripts/moon.php?i=0.028&amp;p=3.388&amp;r=0.035" rel="nofollow noreferrer">https://www.timeanddate.com/scripts/moon.php?i=0.028&amp;p=3.388&amp;r=0.035</a>.</p>
<p>I know that <code>i</code> stands for <em>i</em> llumination in the range 0-1.</p>
<p>However, what are <code>p</code> and <code>r</code> and in what unit? What are the likely correct terms? <code>r</code> appears to be some sort of &quot;rotation angle&quot; of the moon while <code>p</code> is the same for the &quot;mask&quot;.</p>

<the-moon><moon-phases>
What are "p" and "r" wrt the moon?
Marcel Stör
# What are "p" and "r" wrt the moon?

(Asked by: username_0 on 2020-11-13)

Still learning, thinking - and failing - about the moon.

timeanddate.com has this cute and dynamic moon sketch at e.g. <https://www.timeanddate.com/moon/uk/london>

[![enter image description here](https://i.sstatic.net/O6wEX.png)](https://i.sstatic.net/O6wEX.png)

They generate this based on three parameters that they call `i`, `p` and `r`. The above image is the result of invoking this: <https://www.timeanddate.com/scripts/moon.php?i=0.028&p=3.388&r=0.035>.

I know that `i` stands for *i* llumination in the range 0-1.

However, what are `p` and `r` and in what unit? What are the likely correct terms? `r` appears to be some sort of "rotation angle" of the moon while `p` is the same for the "mask".

**Tags:** the-moon, moon-phases


---

## 2 answers

### Answer by username_0 on 2021-12-27. Score: 1 | Accepted answer

I was finally able to crack this.

`i` = illumination

`p` = rotation of the "mask" (i.e. shadow) = bright limb angle + π/2 - parallactic angle

`r` = rotation of the moon = position angle of axis - parallactic angle

(all angles in radians)

Computational sources for programmers:

* Java: <https://bitbucket.org/talonsoalbi/sunmooncalculator/src/master/SunMoonCalculator.java>
* C++: <https://github.com/ThingPulse/esp8266-weather-station/blob/master/src/SunMoonCalc.cpp>
* Python: <https://github.com/bokepasa/SunMoonCalculator>


---

### Answer by username_1 on 2020-11-13. Score: 4

Yes, the are angles in radians. With "i=0.5" to make things clearer:

* $p=0$ is the right half illuminated
* $p=\pi/2=1.57$ is top half illuminated (rotated anticlockwise by 90 degrees)
* $p=\pi=3.14$ is left half illuminated (rotated 180 degrees)

and so on.

The r parameter is the rotation of the moon, so $r=0$ is "lunar north up" $r=pi/2$ is rotated anticlockwise by 90 degrees.

> **Comments:**
> **username_0**: Thank you for explanations. I use a piece of software that provides a plethora of moon (phase) properties for a given timestamp and location. "axis position angle", "bright limb angle" and "paralactic angle" don't mean much to me yet but I will analyze them and try to understand which ones relate to the above.  

---

