207_15.py
from visual import*
v=0.03
v2=0.05
dt=0.001
t=0
scene=display(title=’1′,width=800,height=800,x=0,y=0,center=(0,0.06,0),background=(0.5,0.3,0.2))
floor=box(pos=(0,-(0.005)/2,0),length=0.3,height=0.005,width=0.1)
cube=box(pos=(0,0.05/2,0),length=0.05,height=0.05,width=0.05,color=color.blue)
cube2=box(pos=(0,0.05/2,0),length=0.05,height=0.05,width=0.05,color=color.yellow)
cube3=box(pos=(0,0.05/2,0),length=0.04,height=0.04,width=0.04,color=color.red)
cube4=box(pos=(0,0.05/2,0),length=0.03,height=0.03,width=0.03,color=color.cyan)
while(cube.pos.x<0.10):
rate(1000)
t+=dt
cube.pos.x+=v*dt
cube.pos.y+=v*dt
cube2.pos.x-=v2*dt
cube2.pos.y+=v2*dt
cube3.pos.y+=v2*dt
cube4.pos.x+=v*dt