In this paper I describe an interactive Gauss’s law computer simulation using the GlowScript programming environment. The simulation calculates a point charge’s electric field at locations on the surface of a Gaussian cube and displays the electric field in GlowScript’s 3D graphics window. The point charge can be moved, and the electric field visualization will update dynamically. Students can use the simulation controls to record the electric field strength and direction, and then copy and paste the data into a spreadsheet in order to calculate the electric flux through the cube. The simulation can be used as part of a quantitative virtual laboratory to develop a student’s intuition for electric flux and Gauss’s law. The simulation can be accessed at https://sites.google.com/view/gauss/home.

1.
Christopher A.
Brueningsen
, “
Tinkering with Gauss’s law
,”
Phys. Teach.
32
,
12
13
(
Jan.
1994
).
2.
Martha
Lietz
, “
A potential Gauss’s law lab
,”
Phys. Teach.
38
,
320
221
(
April
2000
).
3.
J. Patrick
Donohoe
, “
A laboratory experiment to demonstrate Gauss’s law for electric fields
,”
Am. J. Phys.
76
,
963
(
Oct.
2008
).
4.
Daniel O.
Ludwigsen
and
Gregory N.
Hassold
, “
A simple electric field probe in a Gauss’s law laboratory
,”
Phys. Teach.
44
,
470
(
Oct.
2006
).
5.
Jeff
McManus
, “
Demystifying electric flux and Gauss’s law
,”
Phys. Teach.
55
,
252
(
April
2017
).
6.
R.
Chabay
and
B.
Sherwood
,
Matter and Interactions
(
Wiley & Sons
,
2015
).
7.
Marcos D.
Caballero
,
Norman
Chonacky
,
Larry
Engelhardt
,
Robert C.
Hilborn
,
Marie Lopez
del Puerto
, and
Kelly R.
Roos
, “
PICUP: A community of teachers integrating computation into undergraduate physics courses
,”
Phys. Teach.
57
,
397
(
Sept.
2019
).
8.
B.
Gregorcic
and
M.
Bodin
, “
Algodoo: A tool for encouraging creativity in physics teaching and learning
,”
Phys. Teach.
55
,
25
28
(
Jan.
2017
).
9.
W.
Christian
,
M.
Belloni
,
F.
Esquembre
,
B. A.
Mason
,
L.
Barbato
, and
M.
Riggsbee
, “
The Physlet approach to simulation design
,”
Phys. Teach.
53
,
419
422
(
Oct.
2015
).
10.
C. E.
Wieman
,
W. K.
Adams
,
P.
Loeblein
, and
K. K.
Perkins
, “
Teaching physics using PhET simulations
,”
Phys. Teach.
48
,
225
227
(
April
2010
).
11.
W.
Christian
and
F.
Esquembre
, “
Modeling physics with easy Java simulations
,”
Phys. Teach.
45
,
475
480
(
Nov.
2007
).
12.
PhET Simulations
,
University of Colorado Boulder
, https://phet.colorado.edu/, accessed on March 31, 2021.
13.
W.
Christian
,
M.
Belloni
,
Physlet Physics
, https://www.compadre.org/Physlets/, accessed on March 31, 2021.
14.
PhET Simulations
,
University of Colorado Boulder
, https://phet.colorado.edu/en/simulation/charges-and-fields, accessed on March 31, 2021.
15.
W.
Christian
,
M.
Belloni
,
Physlet Physics
, https://www.compadre.org/Physlets/electromagnetism/intro24.cfm, accessed on March 31, 2021.
16.
Ruth
Chabay
,
David
Scherer
, and
Bruce
Sherwood
,
VPython
, https://www.glowscript.org/docs/VPythonDocs/index.html, accessed on March 31, 2021.
AAPT members receive access to The Physics Teacher and the American Journal of Physics as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.