Il pianeta Terra

Con due righe di codice appare il pianeta Terra!

from vpython import * 

sphere(texture=textures.earth)

Aggiungi alcune righe di codice e la Terra ruota sul suo asse

from vpython import *
 
s = sphere(texture=textures.earth)

RATE  = 30
DELTA = pi/100

while(True):
    rate(RATE)
    s.rotate(angle=DELTA, axis=vector(0,1,0))

La sfera s subisce, 30 volte al secondo, una rotazione rispetto all’asse y (verticale) di pi/100 radianti