Created
September 9, 2020 18:10
-
-
Save Refath/1f95dfe619f358c2f0f61df15d6bed43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GlowScript 3.0 VPython | |
c = 3e8 | |
m = 1.6e-27 | |
E = (1.6e-19)/((8.85e-12)**2) | |
Q = 1.6e-19 | |
v = 3 | |
e0 = 8.85e-12 | |
shader = canvas(width = 700, height = 700, background = color.white) | |
charge = sphere(radius = 1e10, pos = vector(0,0,0), color = color.red, make_trail=True) | |
time = 0 | |
dt = 0.01 | |
while(time <= 1000): | |
rate(10) | |
charge.pos.x = v*time | |
charge.pos.y = 10*(Q*E*(time**3))/(2*m) | |
time = time + dt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment