Lunar phases - Script

Hello Forum.
I’m trying to create a script to show the various phases of the moon.
Currently, I have two sliders that have to be manipulated separately (re: first slight 1-180-degrees…and then the 2nd slider for 181-360-degrees.
How can I reduce it to a single slider?
I’d also like to use the 2 curves to be combined to create a surface…but my attempts are unsuccessful.
Can anybody offer any assistance?
Thanks,
Jason
Luna panel.gh (16.2 KB)

1 Like


Luna panel_2022Jan2a.gh (16.8 KB)

There is a flaw when the angle slider (blue group) is set to zero or 360 as it shows the full disk instead of an empty circle… :thinking:

P.S. Fixed. (twice) UPDATED…


Luna panel_2022Jan2bb.gh (14.3 KB)

2 Likes

What can I say @Joseph_Oster …except…excellent solution.
Thank you.
My script was certainly a little more convoluted than yours.
Kind regards,
Jason