from visual import * from physutil import * #Set up windows scene.width = 1024 scene.height = 768 #Objects track = box(pos=vector(0,0,0), size=vector(10,0.1,1), color=color.white) fancart = box(pos=vector(-4.75,0.15,0), size=vector(0.5,0.19,0.3), color=color.red) fancartMotionMap = MotionMap(fancart, 10, 10, markerScale=2) #Parameters and Initial Conditions fancart.mass = 0.3 fancart.p = vector(0.15,0,0) #Time and time step dt = 0.5 t = 0 #Calculation loop while t < 10: rate(25) Ffan = vector(0.025,0,0) fancart.p = fancart.p + Ffan*dt fancart.pos = fancart.pos + (fancart.p/fancart.mass)*dt fancartMotionMap.update(t, fancart.p) t = t + dt