Lab 03 - SRGA

Lab 03 - SRGA - print 'cart momentum =', pcart deltat =...

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 * track = box(pos=vector(0,-.05, 0), size=(2.0, 0.05, .10), color=color.white) cart = box(pos=vector(-.95, 0, 0), size=(.1, .04, .06), color=color.red) mcart = 0.80 pcart = mcart*vector(0.5, .5, 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: print 'cart momentum =', pcart deltat = 0.01 t = 0 Fair = vector(.3, 0, 0) while t < 3.85: t = t + deltat pcart = pcart + Fair*deltat cart.pos = cart.pos + (pcart/mcart)*deltat rate(100) print 'after the loop'...
View Full Document

Ask a homework question - tutors are online