GlowScript 2.8 VPython # Setting up the Position Graph g1=graph(width=400, height=200,xtitle='time', ytitle='position') xDots=gdots(color=color.green, graph=g1) # Defining the Object obj=sphere(pos=vector(-1,0,0),radius=0.1,color=color.red, make_trail=True) # Setting initial conditions and step size, dt t=0 dt=0.05 x0=-1 v0=1.0 # This is main part - the loop while t<2: rate(10) x=x0+v0*t obj.pos=vector(x,0,0) xDots.plot(t,x) t=t+dt