import icons
import random

# The sky
Rectangle(color='midnightblue')

# Scatter some stars randomly
random.seed(1)
for i in range(50):
    x = random.random() * 100
    y = random.random() * 100
    icons.Star(color='gold', width=3, height=3, x=x, y=y)

# The globe
Circle(color='darkgreen', width=60, height=60)
earth = icons.GlobeAmericas(color='skyblue', width=60, height=60)

# Rotation
with animation(duration=60):
    earth.rotation = 360

Rotating Globe

by ludwik

Created 2 years, 9 months ago.