{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

fancart - pcart = mcart vcart print'cart momentum = pcart...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
from __future__ import division from visual import * f track = box(pos=vector(0,-.05, 0), size=(2.0, 0.05, .10), color=color.white) t cart = box(pos=vector(.95,0,0), size=(0.1,0.04,0.06), color=color.magenta) c mcart = .80 vcart = vector(-.5,.3,0)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: pcart = mcart * vcart print 'cart momentum =', pcart deltat = 0.01 t = 0 Fair = vector(.056,0,0) F while t<13: rate(100) pcart = pcart + Fair*deltat cart.pos = cart.pos + (pcart/mcart)*deltat t = t + deltat print 'after the loop'...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online