Moon age

creating moon phases using Path

Gif_b91d7cb2-69fd-4039-9711-2b423fc84331

3 Likes

This looks great. Any chance you can share how you did this? :slight_smile:

I’m a new member, so I can’t upload files yet. Instead, I’ll just share the path values.
I divided it into a left semicircle and a right semicircle. It might look a bit rough, but I hope you’ll take a good look at it!

right shadow :
M 50 0 A $if(gv(λ‹¬λ‚˜μ΄)<16,0,50)$ 50 0 0 1 50 100 M 50 100 A $if(gv(λ‹¬λ‚˜μ΄)<7.5,50/7*(7-gv(λ‹¬λ‚˜μ΄)),if(gv(λ‹¬λ‚˜μ΄)>15,50/7*(7-(gv(λ‹¬λ‚˜μ΄)-15)),0))$ 50 0 0 0 50 0

left shadow:
M 50 0 A $if(gv(λ‹¬λ‚˜μ΄)>22.5,50/7*(gv(λ‹¬λ‚˜μ΄)-22),50)$ 50 0 0 1 50 100 M 50 100 A $if(gv(λ‹¬λ‚˜μ΄)>7.5 & gv(λ‹¬λ‚˜μ΄)<=15,50/8*(gv(λ‹¬λ‚˜μ΄)-7),if(gv(λ‹¬λ‚˜μ΄)>15 & gv(λ‹¬λ‚˜μ΄)<22.5,50,0))$ 50 0 0 0 50 0

gv(λ‹¬λ‚˜μ΄) is same β€œai(mage)”

Awesome! Thank you for sharing this.

I had made a moon phase widget using a circle as mask and moving the circle from left to right based on moonage.

Thank you for sharing!
I modified it based on your path and used it as a mask.
But I use layer/texture/bitmap to add the image of the moon it works directly.
Hope it helps those in need.

Path:
M 50 0
A $if(ai(mage)<=16,50,if(ai(mage)<22.5,(22.5-ai(mage))*50/7.5,(ai(mage)-22.5)*50/7.5))$ 50 0 0 $if(ai(mage)>22.5,0,1)$ 50 100
A $if(ai(mage)<16,if(ai(mage)<7.5,(7.5-ai(mage))*50/7.5,(ai(mage)-7.5)*50/7.5),50)$ 50 0 0 $if(ai(mage)>7.5,1,0)$ 50 0