Katie McIntyre

Purpose:

The purpose of this lab was to model the motion of physical objects using the computer program, VPython.

Equiptment:

VPython program and tutorial

Program:

from visual import*
scene.y = 400 # move animation window down 400 pixels from top of screen
from visual.graph import*
track = box(pos=vector(0,-.05, 0), size=(1.0, 0.05, .10))
cart = box(pos=vector(-0.5,0,0), size=(01, 0.04, .3), color=color.blue)

cart.m = 0.80
cart.p = cart.m*vector(0.9, .2, -.2)

deltat = 0.01
t = 0
mgraph = gcurve(color=color.red)

cart.trail = curve(color=color.yellow)

while t<3.0:
    cart.pos = cart.pos + (cart.p/cart.m)*deltat
    rate(100)
    Fnet = vector(0.1, -.2, 0)
    cart.p = cart.p + Fnet*deltat
    print -0.9, t, 0.8, cart.p
    t = t + deltat
    mgraph.plot( pos=(t, cart.p.x) )
    cart.trail.append(pos=cart.pos)
if cart.pos.y < 0:cart.p.y = abs(cart.p.y) # make the cart move upward

 

Data Analysis:

1. Using the printed list of momentum vectors, calculate p
pf = <1.021, -0.442, -0.16>
pi = <0.721, 0.158, -0.16>
pf - pi = <0.3,-0.6,0>kg m/s

2. Calculate the vector Ft.                                                                                                                                   
0.1*-0.2=-.02

3. Do your calculations show that the change in momentum p is equal to Ft?
No, the vector Ft is smaller than the momentum vector.

4. Look at the printed list of momentum vectors again. Why aren.t the y or z components of the momentum changing?
The momentum of the box is only enforced in the x-direction. If momentum was in the y-direction or z-direction then those values would be changing.