In this tutorial we are going to show how to draw a crescent moon. It can be done easily with two steps: 1. Draw a full moon 2. Draw a filled circle with background color overlapping the full moon.
Step 1. Let use ‘dark blue’ as the background color and draw an orange full moon. The following is the code snippet:
turtle.bgcolor('dark blue')
turtle.up()
turtle.goto(0,-200)
turtle.color('orange')
turtle.begin_fill()
turtle.circle(200)
turtle.end_fill()
Step 2. Draw a filled circle with the same color as the background next to the moon. The following is the code snippet:
turtle.up()
turtle.goto(50,-200)
turtle.color('dark blue')
turtle.begin_fill()
turtle.circle(200)
turtle.end_fill()
You can move the position of the 2nd circle to adjust the size of crescent. You can also try to work on solar eclipse animation.