# Lab6 - from _future_ import division f from visual import *...

This preview shows pages 1–2. Sign up to view the full content.

from __future__ import division from visual import * f ## Initial values # velocity = vector(-5.2e4, 0, 0) # Enter the proton's velocity position = vector(3e-10, 0, 0) radius = 8e-11 deltat = 1e-19 # Adjust if program runs too slowly or too quickly d scene.autoscale=1 #Turns off autoscaling. Set to 1 to turn it back on. s ## Constants # # In this section, define any constants you may need mnofp = 1e-7 protonq = 1.6e-19 scale = 2e-8 s ## Objects # #Change the initial vector position of the proton below: proton = sphere(pos=position, radius=1e-11, color=color.red) p #Change the observation location (position of the tail of the arrow) below: barrow1=arrow(pos=vector(0,1,0)*radius, axis=vector(0,0,0), color=color.cyan) b #Add more arrows to find magnetic field at other observation locations. #Set axis to (0,0,0) initially and update it in the loop. barrow2=arrow(pos=vector(0,-1,0)*radius, axis=vector(0,0,0), color=color.cyan) barrow3=arrow(pos=vector(0,0,1)*radius, axis=vector(0,0,0), color=color.cyan)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/14/2011 for the course PHYSICS 2212 taught by Professor N/a during the Spring '08 term at Georgia Institute of Technology.

### Page1 / 2

Lab6 - from _future_ import division f from visual import *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online