Every night, the Moon shows a different face in the night sky. On some nights we can see its entire face, sometimes it’s partially hidden, and on others it isn’t visible at all.
The ScratchJr animation below is very simplified, but it explains the basic mechanism of the changing lunar phases. You can also use it to teach what a “full moon” or a “new moon” is, etc.
A perfect coding activity to incorporate into your science lesson! 😊
Felling inspired? Let’s start coding!
Please note: the animation is very simplified and the actual mechanism of lunar phases is quite complicated. You can read more details here.
The trick is to use solid navy-blue background and a round “shadow” character in the same color.
The “shadow” character blends with the background, so it’s not visible at first.
- Edit the background and fill it with solid color. Add the “Full Moon” character and place it in the middle.
2. Create a navy-blue circle character (the circle should be a little bit bigger that the Moon) and place on the right-hand side.
3. Now, it’s time to move our circle! As the “shadow” moves, it covers the Moon making it appear nearly or totally invisible.
The shadow should move a little bit, then wait; then move a little bit and wait again. The best way to achieve a functional animation is to repeat this movement in a loop. Here is the script:
The animation is fully working now, but you can add some additional objects (a planet or some twinkling stars) to make it prettier.
Looking for other astronomy-flavored animations? Check the Moon orbiting the Earth post and learn how to move one ScratchJr object around another!
Have fun coding!