CodeCodeCode

weartyug

Sep 21st, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from visual import *
  2. from __future__ import division
  3.  
  4. # Define Const
  5. e = 1.6e-19
  6. oofpex = 9e9
  7. scalefactor = 1
  8.  
  9. L = 2
  10. N = 6
  11. Q = 3e-8
  12. deltax = L/N
  13. deltaq = Q/N
  14. obslocation = vector(.3,.4,0)
  15.  
  16. #Init Val
  17. x = -L/4
  18. Enet = vector(0,0,0)
  19.  
  20. #Create Obj
  21. while x < L/2:
  22. sphere(pos = (x,0,0), radius = .1, color = color.cyan)
  23. x = X + deltax
  24.  
  25. #Calc
Advertisement
Add Comment
Please, Sign In to add comment