I am a newb in Visual module in python, not really understand how does it assign a value to an objects. say
from visual import *
stars=[]
galaxies=[]
for i in range(10):
stars+=[sphere('pos,radius,color.....')]
for j in range(20):
galaxies+=[sphere('pos,radius,color......')]
for k in range(30):
stars[k].pos=position[k]
galaxies[k].pos=G_position[k]
i just can not understand, normally, when python read this code, the list would be fully finished after the for loop, but after import visual module, those spheres can show up on screen and update their positions by each iteration of the last for loop!...
or my question may also link to what and where the "show()","print" "start the animation" statement in the visual module and how does it work? how may I use it?
kind of like if I add print state with in the for loop or after it finished.
Thanks alot in advance