Electric Field: Difference between revisions

From Physics Book
Jump to navigation Jump to search
(short description)
 
(106 intermediate revisions by 7 users not shown)
Line 1: Line 1:
'''CLAIMED BY LIANGYU ZHAO - SPRING 2025'''
Electric fields describe the space around charged particles like protons or electrons. The electric field of point charges follows the same trends as Coulomb's law for electric force: a stronger charge means a stronger field, and a further distance means a weaker field. Unlike the electric force, which is defined by a source charge, an observation charge, and the corresponding observation location, the electric field can be defined with only a source charge and an observation location. Electric fields also follow the superposition principle. The fields produced by different charges or charge segments are independent and can be added together to find the net electric field.
==The Main Idea==
==The Main Idea==
In this page, the concept of an electric field produced by a point charge will be described qualitatively and quantitatively through models, examples, and a simulation. In essence, an electric field is a useful concept to describe how any charged particle would affect charge around it through the Coulomb force.
The electric field of a point charge is spherically symmetric, meaning it is the same at all points of equal radius from the source. Hence, it is useful to speak of the electric field at a certain radius (not at a certain <math>(x,y,z)</math> position), which will be done in [[electric Field#A Mathematical Model| the mathematical model]].


Keep in mind, the electric field is a vector quantity that obeys superposition, meaning it has a magnitude and direction.
The electric field describes how an electrically charged particle or group of particles (source charge) would affect other electrically charged objects (test charge) placed in the field. The familiar electric force may be viewed as a consequence of the test charge's interaction with the field. Every position vector <math>\vec{r} = <x, y, z></math> (also works for other coordinate systems) can be associated with an electric field vector <math>\vec{E}(\vec{r})</math>. Electric fields follow the superposition principle. If there are multiple source charges, the net field at a given point equals the sum of the individual fields produced by each source charge. Note the electric field is a vector, meaning it has a direction <math>\hat{E}</math> and a magnitude <math>E</math>. It is measured in N/C (Newtons per Coulomb) or V/m (Volts per meter), depending on which representation is more meaningful in context.  


===A Mathematical Model===
===A Mathematical Model===
The electric field <math>\bigl( \mathbf{E}_{s} \bigl)</math> of a point source charge <math>\bigl( Q_{s} \bigl)</math> gives the magnitude and direction of the electrostatic force <math>\bigl( \mathbf{F}_{s} \bigl)</math> exerted on a unit charge (<math>1</math> Coulomb) by <math>Q_{s}</math>, as a function of position <math>\bigl( \mathbf{r} = (x,y,z) \bigl)</math>. More generally however, the electrostatic force exerted on any point charge <math>\bigl( q \bigl)</math> by a point source charge <math>\bigl( Q_{s} \bigl)</math> is related to the source charge's electric field by:
====Using Force====
The electric field can be expressed as follows: <math>\vec{F} = q\vec{E} \Rightarrow \vec{E} = \frac{1}{q}\vec{F} = \frac{1}{q}\frac{1}{4\pi\epsilon_{0}}\frac{Qq}{r^{2}}\hat{r} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r}</math>
:<math>\frac{1}{4\pi\epsilon_{0}}</math> (also represented as <math>k</math> or <math>k_{e}</math>) refers to the electric constant
:<math>r</math> (also represented as <math>|\vec{r}|</math> or <math>||\vec{r}||</math>) refers to the distance between the source charge and the observation location
:<math>\hat{r}</math> refers to the unit vector that points from the source charge to the observation location
:<math>Q</math> refers to the charge of the source charge
:<math>q</math> (from the initial expression) refers to the charge of the test charge
Note the inverse-square relationship between the magnitude of the field <math>E</math> and the distance <math>r</math>. Also note that <math>r</math> cannot equal 0, so there is no self-interaction between a point charge and itself. The asymptote at <math>r = 0 </math> m and the magnitude of the electric field <math>E</math> decaying by a factor of <math>r^{2}</math> can be seen below:
[[File:MagnitudeofEField.jpg|center|700px|thumb|<math>2 \times 10^{-15} \ \text{C}</math> point charge's Electric Field magnitude as a function of radius (Laurence, 2020).]]


::<math>\mathbf{F}_s ( \mathbf{r} ) = |q| \mathbf{E}_{s} ( \mathbf{r} )</math>
====Using Superposition====
The <math>\vec{E} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r}_{ }</math> equation is valid for a single point charge. By the superposition principle, we can use this equation to find the electric field of more complicated structures like dipoles, quadrupoles, lines, spheres, shells, planes, etc. The sum can be expressed as follows: <math>\vec{E}_{net} = \sum_{i=1}^{N}\vec{E}_{i} = \vec{E}_{1} + \vec{E}_{2} + \cdots + \vec{E}_{N}</math>
:<math>\vec{E}_{i}</math> refers to the field produced by one point charge
:<math>N</math> refers to the total number of point charges


This definition requires an understanding of the electrostatic force (Coulomb's Law), and its mathematical description. If you are not familiar with this yet, read over the [[Electric Force]] page and come back.
====Using Electric Potential====
The electric field is also related to the electric potential <math>V</math> (not discussed at the start of the course): <math>\Delta V = V(\vec{r_{f}}) - V(\vec{r_{i}}) = -\int_{\vec{r_{i}}}^{\vec{r_{f}}} \vec{E}(\vec{r}) \cdot \vec{dl} = - \int_{x_{i}}^{x_{f}} E_{x}dx - \int_{y_{i}}^{y_{f}} E_{y}dy - \int_{z_{i}}^{z_{f}} E_{z}dz \Rightarrow
\vec{E} = - \nabla V = <- \frac{\partial V}{\partial x}, - \frac{\partial V}{\partial y}, - \frac{\partial V}{\partial z}></math>
:<math>\vec{r_{f}}</math> and <math>\vec{r_{i}}</math> represent the final and initial positions
:<math>\vec{dl}</math> represents an infinitesimal length along any path
:<math>\nabla V</math> represents the gradient of the voltage


Since the electric force is defined as:
===A Computational Model===
 
When visually drawing the electric field, the arrows point away from the positive charge and toward the negative charge. A stronger field strength can be represented by longer arrows or more densely packed arrows.  
::<math>\mathbf{F}( \mathbf{r} ) = \frac{1}{4\pi\epsilon_{o}}\frac{|q_{1} q_{2}|}{r^{2}} \hat{\mathbf{r}}</math>, where
[[File:EFieldArrows2025.png|center]]
:::<math>\epsilon_{o}</math> is the permittivity of free space with a value of <math>8.854 \times 10^{-12} \frac{\text{C}^2}{\text{N} \cdot \text{m}^2}</math>
:::<math>q_{1}</math> and <math>q_{2}</math> are point charges one and two, respectively
:::<math>r</math> is the distance between the two point charges, which can also be written as <math>|\mathbf{r}|</math>, the magnitude of the vector connecting the two charges' positions
:::<math>\hat{\mathbf{r}}</math> is the unit vector pointing from charge one to charge two, or from charge two to charge one, depending on whether the force on charge two or charge one is wanted.
 
The electric field of a source charge <math>Q_{s}</math> is:
 
::<math>
\begin{align}
\mathbf{E}_{s} ( \mathbf{r}) & = \frac{\mathbf{F}_{s} ( \mathbf{r} )}{|q|} \\
& = \frac{1}{4\pi\epsilon_{o}}\frac{|Q_{s}|}{r^{2}}\hat{\mathbf{r}}
\end{align}
</math>
 
Radially, the magnitude of a charge's electric field may look something like this:
 
 
[[File:MagnitudeofEField.jpg|center|700px|thumb|<math>2 \times 10^{-15} \ \text{C}</math> charge's electric field magnitude as a function of radius.]]
 
A point charge's electric field is also related to its [[Electric Field and Electric Potential]]. If you are unfamiliar with the idea of electric potential, then review those pages ([[Electric Field and Electric Potential]] or [[Electric Potential]] and come back.


A charge's electric field and electric potential <math>V</math> are related by:
The following code can be used to visualize the electric field produced by a positive point charge. The interactive viewer may be found here: [https://trinket.io/glowscript/c7521c3fbc76 New field simulation code]. Note that this code was not used to generate the exact images on this page. However, it is functionally identical to the old code and produces very similar images. For reference, the old code may be found at the bottom of the page or this link: [https://trinket.io/glowscript/fddb68480031 Old field simulation code].
[[File:NormalEField.png|right|250px|thumb|Normal view of simulated electric field (Laurence, 2020)]]
[[File:CenteredAndDistantEField.png|right|250px|thumb|Distant view of simulated electric field (Laurence, 2020)]]
[[File:RotatedAndZoomedInEField.png|right|250px|thumb|Rotated and zoomed in view of simulated electric field (Laurence, 2020)]]
<pre>
GlowScript 3.2 VPython
### LIANGYU ZHAO, SPRING 2025
### VISUALIZE THE FIELD LINES PRODUCED BY A POINT CHARGE


::<math>V_{ab} = -\int_{\mathbf{b}}^{\mathbf{a}} \mathbf{E} \cdot d\mathbf{L}</math>, where
scene.caption = """Right button drag or Ctrl-drag to rotate "camera" to view scene."""
:::<math>V_{ab}</math> is the potential difference between points <math>\mathbf{a}</math> and <math>\mathbf{b}</math>
origin = sphere(pos = vector(0, 0, 0), radius = 0.5)
:::<math>\mathbf{E}</math> is the electric field
:::<math>d\mathbf{L}</math> is an infinitesimal length in the direction of the path


This relation is less useful for us unless we use a straight line approximation, such that:
### CONSTANTS
num = 5
scale = 7e-1


::<math>
### GENERATE LOCATION POINTS
\begin{align}
data = []
V_{ab} & = -\mathbf{E} \cdot \Delta \mathbf{L} \\
dist = []
& = - \bigl( E_{x}, E_{y}, E_{z} \bigl) \cdot \bigl( \Delta L_{x}, \Delta L_{y}, \Delta L_{z} \bigl) \\
for x in range(-num, num + 1):
& = - \bigl( E_{x}\Delta L_{x} + E_{y}\Delta L_{y} + E_{z}\Delta L_{z} \bigl) \\
  for y in range(-num, num + 1):
\end{align}
    for z in range(-num, num + 1):
</math>
      data.append([x, y, z])
      d = (x**2 + y**2 + z**2) ** 0.5
      if d not in dist:
        dist.append(d)
### GENERATE COLOR MAPPINGS
dist.sort()
dist = dist[1:]
uniq = len(dist)
step = 1 / uniq * 2
colo = [vector(1, 0, 0)]
mapp = {}
for x in range(uniq):
  if x < uniq / 2:
    colo.append(colo[x] + vector(-step, step, 0))
  else:
    colo.append(colo[x] + vector(0, -step, step))
  mapp[dist[x]] = colo[x]
### GENERATE ARROWS
for loca in data:
  posi = vector(loca[0], loca[1], loca[2])
  dir = norm(posi)
  rmag = mag(posi)
  emag = rmag ** -2
  headL = emag * scale * 5e-1
  headW = emag * scale * 5e-1
  axis = emag * dir * scale
  try:
    acol = mapp[rmag]
  except:
    acol = vector(0, 0, 0)
  arrow(pos = posi, color = acol, headlength = headL, headwidth = headW, axis = axis)
</pre>


This leads to:


::<math>\mathbf{E} (x,y,z) = - \biggl( \frac{V_{x}}{\Delta L_{x}}, \frac{V_{y}}{\Delta L_{y}}, \frac{V_{z}}{\Delta L_{z}} \biggl)</math>
* This link [https://phet.colorado.edu/en/simulation/charges-and-fields Charges and Fields] provides a PhET simulation of '''Electric Fields'''. Play with it!


By convention, the electric field due to a positive point charge points away from the source, and the electric field of a negative charge points towards the source as shown below:
* Or if you prefer something with more action, explore this [https://phet.colorado.edu/sims/electric-hockey/electric-hockey Hockey Game]  to gain a deeper visual understanding of electric fields and their effects on charges
 
===A Computational Model===


==Examples==
==Examples==
===Simple===
===Simple===
===Middling===
*''Question'':
===Difficult===
::In the following figure, the red circles represent positive point charges, and the blue circles represent negative point charges. If the yellow arrows are meant to represent the '''Electric Field''' due to each point charge, '''''which field(s) and charge(s) are correctly matched?''''' (Only take into account direction)
 
==Connectedness==


==History==
[[File:ElectricFieldSimpleExample.png|600px|center]]


==See also==
*''Solution'':
===Further reading===
::Since '''Electric Field''' lines always point away from a positive point charge, Option (C.) cannot be correct. Likewise, '''Electric Field''' lines always point towards a negative charge. Therefore, Option (A.) is also incorrect.
===External links===
::Option (B.) shows a positive charge with an '''Electric Field''' pointing radially outwards. This is correct. Option (D.) shows a negative charge with an '''Electric Field''' pointing radially inwards. This is also correct.


==References==
*''More simple examples from class notes''
[[File:Elecfield1.jpg|example|center]]
[[File:Elecfield2.jpg|example|center]]


==The Main Idea==
===Middling===
 
*''Question'':
The main idea of this page is to develop an understanding of electric fields and the types of particles that produce electric fields.
:: Four point charges <math>\big(q_{1}, q_{2}, q_{3}, \text{and} \ q_{4} \big)</math>, are each located at a distance <math>d</math> along either the <math>x</math> or <math>y</math> axes, as shown in the figure below. If <math>\ |q_{3}| = |q_{1}| \ \text{and} \ |q_{4}| = |q_{2}|</math> what does the Electric Field at the origin reduce to?'''''
 
[[File:ElectricFieldMiddlingExample.png|600px|center]]
==History==
 
Electric fields are created by electric charges. The original discovery of the electric charge is not explicitly known, but in 1675 the esteemed chemist [[Robert Boyle]], known for [[Boyle's Law]], discovered the attraction and repulsion of certain particles in a vacuum. Almost 100 years later in the 18th century the American [[Benjamin Franklin]] first coined the phrases positive and negative (later developed into proton and electron) for these particles with attractive and repulsive properties. Finally, in the 19th century [[Michael Faraday]] utilized his electrolysis process to discover the discrete nature of electric charge.
 
 
== Electric Field==
 
Electric Field is a [[field]] created by an electric charge.  It is measured in units of newtons per coulomb (N/C), the proper units of which are (kg*(m/s^2)), and has a direction, making it a vector quantity. Electric fields can also be in the units of volts per meter (V/m). The electric field created by a charge exists at all points in space and exerts a force on other charged objects.  The field can be drawn as an arrow with tail at the observation location pointing in the direction of the field.  The Electric field obeys superposition, so the net Electric field at a point in space can be determined by summing all the individual fields present at that location.


The electric field of a positive particle points away from the particle, while the electric field of a negative particle points toward the particle, as seen right here:
*''Solution'':
[[File:Posandnegefield.png]]
:*'''A.)''' We can start by observing the geometry of the problem. We want the net field at the origin, and the distance between the origin and each point charge is identical. <math>r_{1} = r_{2} = r_{3} = r_{4} = d</math> We also need to find the unit vector <math>\hat{r}</math> that points from each point charge to the origin. <math>\hat{r_{1}} = -\hat{y}, \hat{r_{2}} = -\hat{x}, \hat{r_{3}} = \hat{y}, \hat{r_{4}} = \hat{x}</math>
:*'''B.)''' Next, we need to calculate each electric field from each point charge using <math>\vec{E} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r}</math>.
:::<math>\vec{E}_{1} = k\frac{q_{1}}{r_{1}^{2}}\hat{r_{1}} = k\frac{q_{1}}{d^{2}}(-\hat{y}) = -k\frac{q_{1}}{d^{2}}\hat{y}</math>
:::<math>\vec{E}_{2} = k\frac{q_{2}}{r_{2}^{2}}\hat{r_{2}} = k\frac{q_{2}}{d^{2}}(-\hat{x}) = -k\frac{q_{2}}{d^{2}}\hat{x}</math>
:::<math>\vec{E}_{3} = k\frac{q_{3}}{r_{3}^{2}}\hat{r_{3}} = k\frac{-q_{3}}{d^{2}}\hat{y} = -k\frac{q_{1}}{d^{2}}\hat{y}</math>
:::<math>\vec{E}_{4} = k\frac{q_{4}}{r_{4}^{2}}\hat{r_{4}} = k\frac{q_{4}}{d^{2}}\hat{x} = k\frac{q_{2}}{d^{2}}\hat{x}</math>
:*'''C.)''' Finally, we apply the superposition principle. We can notice that the fields along the <math>\hat{x}</math> axis cancel out because the magnitudes are equal, but the directions are opposite. We can also observe that the fields along the <math>\hat{y}</math> axis create a stronger field because the directions are equal.
:::<math>\vec{E}_{net} = \vec{E}_{1} + \vec{E}_{2} + \vec{E}_{3} + \vec{E}_{4} = -k\frac{q_{1}}{d^{2}}\hat{y} - k\frac{q_{2}}{d^{2}}\hat{x} - k\frac{q_{1}}{d^{2}}\hat{y} + k\frac{q_{2}}{d^{2}}\hat{x} = -2k\frac{q_{1}}{d^{2}}\hat{y}</math>


*''More middling examples from class notes''
[[File:Elecfield3.jpg|center|example]]


When two oppositely charged particles are placed next to each other, their electric field moves from the positive to the negative. Two similarly charged particles will have fields that are repelled by each other. This is shown below:
[[File:Multiplechargeefield.png]]
The two oppositely charged particles, when in very close proximity, will act together in the form of a [[dipole]].
=== Mathematical Concept of a Field===
In mathematics, a field is a value that exists at all points in space.  The magnitude of an electric field is a scalar. The field itself is represented as a vector: <x,y,z>.  Other examples of fields are [[gravitational fields]] and [[magnetic fields]].
You can calculate electric field in a few ways. You can calculate the electric field vector and magnitude by using the following equations:
<math>E = \frac{F}{q}</math>, where F is the force and q is the charge of the particle. This formula is very helpful to think about to understand the relation between force and electric field.
<math>E = \frac{kQ}{r^2}</math>, where k is Coulomb's constant, or 9x10^9, Q is the charge of the particle, and r is the distance between both particles.
The magnitude of an electric field can be also be calculated by using the potential difference, Δϕ, between two plates and the distance, d, between them.
:<math>E = -\frac{\Delta\phi}{d}</math>
=== Electric Field and Force===
The force due to an external electric field on a charged particle is given by the equation <math> \vec{F}  = q\vec{E}</math> where q is the charge of the observed particle and E is the electric field.  The field created by a charged particle exerts no force on itself. This is to say that the force on a given particle is defined as the charge on that particle multiplied the combined electric fields of the external environment. Since force is measured in Newtons (N) and charge in Coulombs (C), Electric field is measured in Newtons per Coulomb (N/C) as mentioned earlier. Furthermore, the magnitude of an electric field is not dependent on the sign of q (i.e. whether the charge is positive or negative.) The sign only helps determine the direction that the electric field points.
To calculate the electric force on a particle, first you must calculate the electric fields affecting the particle. Applying superposition, you add all electric fields to find the net field. Once you have this, you multiply the electric field by the charge of the particle, and this gives you the force exerted on the particle. Like charges repel each other and opposite charges attract each other.
[[File:oppositesattract.jpeg]]
=== Electric Field and Superposition===
The electric field contributed by a charged particle is unaffected by the electric field contributed by other charged particles. To that end, the principle of superposition, as mentioned earlier, states that the net electric field at a location is determined by the sum of all individual electric fields on charged particles. The principle of superposition is very useful to determine the force on a given charged particle. By being able to define electric field as a vector and simply adding up the various components of individual electric fields, the force on a particle is easily calculated using <math> \vec{F}  = q\vec{E}</math>
[[File:Superpositionpic.jpg]]
The two must common methods of combining vectors in the principle of superposition are the tail to tail method (number 1 in the image below) and head to tail (number 2 in the image below).
[[File:vector superposition.jpg]]
=== Electric Field and Electric Potential===
Another way to define electric field is using the [[electric potential]] over a certain distance to determine field. Electric potential is referred to as electric field potential or electrostatic potential. In this case, Electric field is shown in units volts (V) per meter (m) (V/m).
Again, electric field is calculated with potential difference with the equation:
<math>E = -\frac{\Delta\phi}{d}</math>
==Examples==
===Simple===
Select all of the arrows that accurately show the electric field produced by the charge shown. (only direction not magnitude)
[[File:SimpleQ1.png]]
We know that the electric field from a single point charge will always point outwards if it is positive and always inwards if it is negative. This means that A and C are both correct. It is also important to remember that opposites will attract. In this case a negative and positive charge will attract to one another in any orientation. It is also important to remember that oppositely charged particles will repel each other, so any negative-negative or positive-positive interaction will result in a repelling force.
===Middling===
What is the magnitude and direction of the electric field at the origin (assume Q = 1 coulomb)?
[[File:MQ1.png]]
There is a positive charge on the right with an electric field pointing to the left at the origin. The negative charge on the left also has an electric field pointing to the left at the origin so we will add the two electric fields as they point along the negative x axis. <math>\frac{k}{1.5^2}+\frac{k*2}{2.25^2} = 0.75*10^{10} </math>. This is a similar mathematical representation to the image in electric field and superposition section of this page. The force of the positive and negative charges are both acting on the specific reference point and have a total Enet value that is the combination of the two opposite forces. The Enet in this scenario is the 0.75*10^{10} </math> value that was calculated in the +x direction.
===Difficult===
===Difficult===
What is the magnitude of the electric field experienced by the positive particle at the top of the triangle?
*''Question'':
[[File:Wikichanges.png]]
::A ring of evenly distributed charge of radius <math>a</math> is centered on the origin in the xy-plane. The ring has a total charge <math>Q</math>. '''''Show that the Electric Field due to this ring is 0 at the origin.'''''
[[File:ElectricFieldDifficultExample.png|600px|center]]


The first step is to find the angle measure of the angle that is opposite of the 8 meter side of the triangle. To do this you must use inverse cosine to find the angle measure. Then we have to find the electric field caused by the other two particles at the point we are analyzing. We need to split the electric field at the point to its x- and y- components. The magnitude of the electric field caused by the positive particle is the following: E= ((9×〖10〗^9)(1×〖10〗^(-6)))/100=90. The negative particle has the following magnitude: E=  ((9×〖10〗^9)(1×〖10〗^(-6)))/64=140.63.No we look at the x- component of the electric field. The negative particle does not create a electric field in the x-direction at the observation location. The positive particle has an electric field of cos(53.13) times the magnitude of the electric field. The electric field in the y-direction is the magnitude of the negative particle and sin(53.13) times the magnitude of the positive particle. The vector for the electric field at the point is as follows: (-54,-68.63). Now we have to find the magnitude of this vector to find the magnitude of the electric field at the observation location. The magnitude is 87.33 N/C.
*''Solution'':
::The '''Electric Field''' due to a point charge is given by:
:::<math>\mathbf{E} = \frac{1}{4 \pi \epsilon_{0}} \frac{|Q|}{| \mathbf{r} - \mathbf{r}^{'} |^{2}} \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |}</math>
:::This equation is equivalent to the formula presented in the [[Electric Field#A Mathematical Model | Mathematical Model]]. The reason it looks so different is due to a few assumptions in the mathematical model that we have stopped using:
:::# The source charge is located at the origin (our ring of charge is around the origin)
:::# The distance between the source charge and the observing location is simply expressed as a distance <math>r</math> (like in the [[Electric Field#Middling| Middling Example]]). Now, instead we will represent the distance as the magnitude of the difference in position between the source and observer <math>\big( | \mathbf{r} - \mathbf{r}^{'} | \big)</math>.
:::# Subsequently, our unit vector in the direction of the field <math>\big( \hat{\mathbf{r}} \big)</math> is not simply expressed as a typical unit vector (like in the middling example). It has now become the vector joining the source and observer divided by the magnitude of this same vector <math>\bigg( \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |} \bigg) </math>.


==VPython==
::Another complication this problem presents is:
::::Where is the source charge?
:::To answer this, notice that the ring has an evenly distributed TOTAL charge <math>Q</math> and a radius <math>a</math>. Also, notice that the "source" position is constantly changing as you go around the ring. This issue makes it much more convenient to speak of the line charge DENSITY at a point along the ring instead of the TOTAL charge. This will allow us to treat the ring as many, many little source charges. The line charge density is simply the charge on the line divided by the length of that line (circumference), since the charge is evenly distributed about the ring:


An arrow can be coded to represent the direction of the electric field at a point in VPython by using the formula for the electric field at a point.
::::<math>\rho_{L} = \frac{Q}{2 \pi a}</math>
[[File:Electricfieldformula.jpg]]


The first step is to define any constants needed. Oofpez (one over four pi epsilon naught) should be defined as 9e9. The charge of the particle creating an electric field should also be defined.
:::This allows us to represent a differential amount of source charge as a product of the line charge density and a differential length:


The second step is to create the particle, which is usually either a proton or an electron.
::::<math>dQ = \rho_{L} dL</math>


The third step is to create an observation location, which can be titled obslocation.
:::The next question is: What is a differential length around the ring?
:::The differential length is a differential arc length <math>(s = r \theta)</math> around the circle dependent on the change in angle:


The fourth step should be to calculate the electric field. Start by defining r, the distance from the observation location to the particle. Next, determine the magnitude of r and r hat. Then, plug all values in to determine the electric field at the observation location.
::::<math>dL = a d\theta</math>


The fifth step is to create an arrow to represent the direction of the electric field.
:::Therefore:
::::<math>
\begin{align}
dQ &= \frac{Q}{2 \pi a} a d\theta \\
&= \frac{Q}{2 \pi} d\theta \\
\end{align}
</math>


===Example===
:::Now we can sum each of these differential source charge's contribution to the '''Electric Field''' at the origin using an integral:
Create an arrow at location <5e-10,0,0> to represent the direction of the electric field generated from a proton located at <2e-10,0,0>.
::::<math>\mathbf{E} = \int \frac{1}{4 \pi \epsilon_{0}} \frac{\frac{Q}{2 \pi} d\theta}{| \mathbf{r} - \mathbf{r}^{'} |^{2}} \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |}</math>


-CONSTANTS-
:::The only things left to find are the generic source position (a vector that can describe the position of each differential source charge along the ring) and the observer location. The observer location is given to us; the origin:
::::<math>\mathbf{r} = 0\mathbf{i} +0\mathbf{j} + 0\mathbf{k}</math>


oofpez = 9e9
:::The source position is easiest to describe as a radius from the origin (polar coordinates):
::::<math>\mathbf{r}^{'} = a \hat{ \mathbf{a}}_{r}</math> where <math>\hat{\mathbf{a}}_{r}</math> is a unit vector in the radial direction


q = 1.6e-19
:::Therefore:
::::<math>
\begin{align}
\mathbf{r} - \mathbf{r}^{'} &= \big( 0\mathbf{i} +0\mathbf{j} + 0\mathbf{k} \big) - \big( a\hat{ \mathbf{a}}_{r} \big) \\
&= -a\hat{ \mathbf{a}}_{r} \\


-OBJECTS-
|\mathbf{r} - \mathbf{r}^{'}| &= \sqrt{(-a)^{2}} \\
&= a \\
\end{align}
</math>


proton = sphere(pos=vec(2e-10,0,0), radius=1e-11, color=color.red)
:::Plugging these into the '''Electric Field''' integral gives:
::::<math>
\begin{align}
\mathbf{E} &= \int \frac{1}{4 \pi \epsilon_{0}} \frac{\frac{Q}{2 \pi} d\theta}{a^2} \frac{-a \hat{ \mathbf{a}}_{r}}{a} \\
&= - \int \frac{1}{8 {\pi}^{2} \epsilon_{0}} \frac{Q}{a^2} \hat{ \mathbf{a}}_{r} d\theta \\
&= - \frac{Q}{a^{2} 8 {\pi}^{2} \epsilon_{0}} \int \hat{ \mathbf{a}}_{r} d\theta \\
\end{align}
</math>


-INITIAL VALUES-
::*<math>\theta</math> is the angle from the x-axis.
::*To integrate over the entire ring, we set the bounds of <math>\theta</math> as <math>[0, 2 \pi)</math>.
::*Also, as of right now, the integral would not evaluate to 0. This is because <math>\hat{ \mathbf{a}}_{r}</math> has a hidden dependence on <math>\theta</math>:
::::<math>\hat{ \mathbf{a}}_{r} = \text{cos}( \theta) \mathbf{i} + \text{sin}( \theta) \mathbf{j}</math>


obslocation = vec(5e-10,0,0)
:::Plugging this information in gives:
::::<math>
\begin{alignat}{3}
\mathbf{E} &= - \frac{Q}{a^{2} 8 {\pi}^{2} \epsilon_{0}} \int_{0}^{2 \pi} \big( \text{cos}( \theta) \mathbf{i} + \text{sin}( \theta) \mathbf{j} \big) d\theta \\
\int_{0}^{2 \pi} \text{cos}( \theta) \mathbf{i} \ d\theta &= 0 \\
\int_{0}^{2 \pi} \text{sin}( \theta) \mathbf{j} \ d\theta &= 0 \\
\end{alignat}
</math>


-CALCULATIONS-
:::Therefore:
::::<math>\mathbf{E} = 0</math> at the origin.


r = obslocation-proton.pos
==Connectedness==
The real world applications of electric fields are endless. Here are some:
[[File:ElectricMotor2025.jpeg|right]]
*'''Electric Motors:'''<br>
:Electric motors convert Electrical Energy into Mechanical Energy through '''Electric Fields'''. Whenever electric motors are turned on, '''Electric Fields''' are generated. This is because in order to turn an electric motor, an '''Electric Field''' must first be generated, which then generates a Magnetic Field, thus making the motor spin. Electric motors are used in cars, elevators, fans, refrigerators, and many more applications.


rmag = sqrt((r.x)**2 + (r.y)**2 + (r.z)**2)
*'''Computers:'''<br>
:Computers use circuits, electric fans, and transistors to work. All of these use '''Electric Fields''' to push charge through a circuit, spin fans, and allow logic to be implemented in electronics.


rhat = (r)/(rmag)
*'''Painting:'''<br>
:'''Electric Fields''' are also used in some paintings. The '''Electric Field''' generates charges on the surface of the material being painted on, and an opposite charge is generated on the paint. Paint that touches the material sticks, and excess paint falls off to go back into the system.


Enet = ((oofpez)*(q)/(rmag**2))*(rhat)
*'''Cancer Treatment:'''<br>
:Recently, weak '''Electric Fields''' have been used to kill cancer cells. This treatment works best for brain and breast cancers, and it has no effect on normal cells. In lab and animal tests, this treatment killed cancer cells of every type tested; however, this is still a developing treatment.


-OBJECTS-
*'''Military and Defense:'''<br>
:'''Electric Fields''' are commonly used in various weapons platforms. Weapons used to rely primarily on explosives; however, electric weapons use stored electrical energy to attack targets. There are two general types: directed-energy weapons (DEWs) and electromagnetic (EM) weapons. DEWs include lasers, radio frequency weapons, and more. EM weapons include rail guns, coil guns, etc. For example, rail guns use EM force to launch high velocity projectiles at a target. They work by using very high electrical currents to induce magnetic fields that accelerate a projectile to extremely high speeds (up to Mach 6).


Efield = arrow(pos=obslocation, axis=Enet, color=color.orange)
==History==
'''Electric Fields''' are created by Electric charges. The original discovery of the Electric charge is not explicitly known, but in 1675 the esteemed chemist Robert Boyle, known for Boyle's Law, discovered the attraction and repulsion of certain particles in a vacuum. Almost 100 years later in the 18th century, the American Benjamin Franklin first coined the phrases 'positive' and 'negative' (later developed into proton and electron) for these particles with attractive and repulsive properties. Finally, in the 19th century Michael Faraday utilized his Electrolysis process to discover the discrete nature of Electric charge.


==Uses of Electric Fields==
==See also==
 
The ability to understand '''Electric Fields''' helps set the basis for the introduction to [[Electric Force]] (as we discussed <math> \mathbf{F}  = q\mathbf{E}</math> ). The introduction of Electric Force will attach the specific charge of the particles with the '''Electric Field''' that they produce, resulting in the Electric Force. Electric Force will lay the ground work for understanding the force that particles have in different systems and environments, and eventually lead to the introduction of [[Magnetic Force]].
===Electric Motors===
The understanding of '''Electric Fields''' is a doorway into many various fields, only some of which will be covered in Physics 2212. The fundamental understanding of '''Electric Fields''' will prove to be very important further along when Magnetic Fields are introduced, as they share many qualities. The understanding of Electric and Magnetic Fields will be used throughout the semester to learn about various Electromagnetic concepts, and ultimately to understanding and apply Maxwell's Equations.  
Electric motors convert electrical energy into mechanical energy through electric fields. Whenever electric motors are turned on, electric fields are generated. This is because in order to turn an electric motor, an electric field must first be generated, which then generates a magnetic field, thus making the motor spin. Electric motors are used in cars, elevators, fans, refrigerators, and many more applications.
 
[[File:electricmotor.jpg]]
===Computers===
In order for computers to run, an electric fan motor must run. As previously mentioned, for electric motors to run, an electric field must be generated. Therefore, electric fields are what allow for us to use modern day computers.
 
===Paintings===
Electric fields are also used in some paintings. The electric field generates charges on the surface of the material being painted on, and an opposite charge is generated on the paint. Paint that touches the material sticks, and excess paint falls off to go back into the system.
 
===Cancer Treatment===
Recently, weak electric fields have been used to kill cancer cells. This treatment works best for brain and breast cancers, and it has no effect on normal cells. In lab and animal tests, this treatment killed cancer cells of every type tested; however, this is still a developing treatment.
 
==Connectedness==
The ability to understand electric fields helps set the basis for the introduction of [[Electric Force]] (as we discussed <math> \vec{F}  = q\vec{E}</math> ). The introduction of electric force will attach the specific charge of the particles with the electric field that they produce, resulting in the electric force. Electric force will lay the ground work for understanding the force that particles have in different systems and environments, and eventually lead to the introduction of [[Magnetic Force]].  
 
== See also ==
 
The understanding of electric fields is a doorway into all the various fields only some of which will be covered in physics 2212. The fundamental understanding of electric fields will prove to be very important further along when magnetic fields are introduced as they share many qualities. The understanding of electric and magnetic fields will be used throughout the semester to learn about various electromagnetic concepts, and ultimately a understanding and application of [[Maxwell's Equations]].  
Please see related topics:
Please see related topics:


[[Magnetic Field]]
===Further reading===
*[[Electric Potential]]<br>
*[[Electric Force]]<br>
*[[Lorentz Force]]<br>
*[[Electric Polarization]]<br>
*[[Charged Ring]]<br>


[[Magnetic Force]]
===External links===
*[https://www.youtube.com/watch?v=EPIhhbwbCNc&list=PLX2gX-ftPVXUcMGbk1A7UbNtgadPsK5BD&index=9 A Youtube Playlist That Does A Great Job Going Step By Step And Reviewing Topics]


[[Farraday's Law]]
*[http://www.physicsclassroom.com/class/estatics/Lesson-4/Electric-Field-Lines Further Review On Electric Field Lines.]  


[[Biot Savart Law]]
*[https://phet.colorado.edu/en/simulation/charges-and-fields Get A Better Understanding Of Fields Through Hands On Manipulation In PhET. This Can Be Very Helpful For Getting An Intuitive Understanding Of Fields.]


===External links===
*[https://en.wikipedia.org/wiki/Electric_field Wikipedia Electric Field]


[https://www.youtube.com/watch?v=EPIhhbwbCNc&list=PLX2gX-ftPVXUcMGbk1A7UbNtgadPsK5BD&index=9 A youtube playlist that does a great job going step by step and reviewing topics]
*[https://www.khanacademy.org/science/physics/electric-charge-electric-force-and-voltage/electric-field/v/electrostatics-part-2 Electric Field]
 
[http://www.physicsclassroom.com/class/estatics/Lesson-4/Electric-Field-Lines Further review on electric field lines.]
 
[https://phet.colorado.edu/en/simulation/charges-and-fields Get a better understanding of fields through hands on manipulation. This can be very helpful for getting an intuitive understanding of fields.]


==References==
==References==
*[https://openstax.org/details/books/university-physics-volume-2 OpenStax Volume on Electricity and Magnetism]<br>
*Hayt & Buck 9th Edition Engineering Electromagnetics<br>
*Matter and Interactions<be>


This section contains the the references you used while writing this page
==Old Simulation Code==
 
    ###--Create Electric Field Lines of a Positive Charge at the Origin--###
[[Category:Which Category did you place this in?]]
    #==============================================================#
    #---Import statements for VPython---#
    from __future__ import division
    from visual import *
    #---Import function used to find combinations---#
    from itertools import combinations
    #==============================================================#
    #---Create scene---#
    scene.center = vector(0,0,0)  #-Position of source charge-#
    scene.height = 800  #-Set height of frame of scene-#
    scene.width = 800  #-Set width of frame of scene-#
    scene.range = 4  #-Set range of scene-#
    scene.userzoom = 1  #-Allow user to zoom in/out: CTRL & move in/out on trackpad-#
    scene.userspin = 1  #-Allow user to rotate camera angle: SHIFT & OPTION & move around on track pad-#
    #==============================================================#
    #---Specify point charge attributes---#
    sourceCharge = 3*10**(-11)  #-Coulombs of charge-#
    sourcePos = vector(0,0,0) #-Position of source charge-#
    ###--Modeling source point charge as a sphere with radius 0.1 meters--###
    sourceObj = sphere(pos = sourcePos, radius = 0.1, color = color.cyan)
    #==============================================================#
    #---Set range (0 to 3) and possible inputs for the coordinates (0.5 step)---#
    ###--Many of the same number included to allow for combinations such as (1,1,1).
        #The itertools.combinations function will only use each element of the...
        #list once, starting from the beginning.
        #Repeating each coordinate many times with intermixing, grants...
        #all combinations of points, with repeats however.
        #Later, a for loop will be used to eliminate repeats.
        #This can be optimized later if need be.---------------###
    posXYZ = [0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3,
              0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3,
              0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3,
              0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3,
              0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3,
              0, -0.5, 1, -1.5, 2, -2.5, 3,
              0, 0.5, -1, 1.5, -2, 2.5, -3]
    #==============================================================#
    #---Create combinations of points (x,y,z) for later use---#
        ###--prelimPoints will be a list of tuples of tuples--##
            #ie: [((,,),(,,),(,,),(,,)) , ((,,),(,,)) ,..., ((,,),(,,))]
    prelimPoints = [tuple(combinations(posXYZ, 3))]
    ###--Pull the points out of the grouping tuples and add them to a...
        #new list alphaPoints------------------------###
    alphaPoints = []
    for groupingTuple in prelimPoints:
        for XYZ in groupingTuple:
            if XYZ not in alphaPoints:  #-Check for repeat (x,y,z)-#
                alphaPoints.append(XYZ)
            ##--The negative of this tuple may not be in the combinations:
                #check to see-------------##
            first = -XYZ[0]
            second = -XYZ[1]
            third = -XYZ[2]
            negXYZ = (first, second, third)
            if negXYZ not in alphaPoints:
                alphaPoints.append(negXYZ)
            ##--Swap x and z coordinates for futher combination checking--##
            first = XYZ[2]
            second = XYZ[1]
            third = XYZ[0]
            reverseXYZ = (first, second, third)
            if reverseXYZ not in alphaPoints:
                alphaPoints.append(reverseXYZ)
            ##--The negative of the x and z coordinate swap may not be in...
                #the combinations: check to see---------##
            first = -XYZ[2]
            second = -XYZ[1]
            third = -XYZ[0]
            reverseXYZneg = (first, second, third)
            if reverseXYZneg not in alphaPoints:
                alphaPoints.append(reverseXYZneg)
            ##--Make x [3], y [0], and z [1] to check for more combinations--##
            first = XYZ[1]
            second = XYZ[2]
            third = XYZ[0]
            shiftedXYZ = (first, second, third)
            if shiftedXYZ not in alphaPoints:
                alphaPoints.append(shiftedXYZ)
            ##--The negative of the shifted XYZ may not be in the combinations:
                #check to see---------------##
            first = -XYZ[1]
            second = -XYZ[2]
            third = -XYZ[0]
            shiftedXYZneg = (first, second, third)
            if shiftedXYZneg not in alphaPoints:
                alphaPoints.append(shiftedXYZneg)
    ###--------This should be enough recombining---------###
    #================================================================#
    #---Create a new list of tuples that contain the points, magnitude,...
        #and direction (betaPoints)-----------#
            #ie: [((x,y,z), mag((x,y,z)), norm((x,y,z))),...]
    betaPoints = []
    for XYZ in alphaPoints:
        Mag = mag(XYZ)
        Dir = norm(XYZ)
        betaPoints.append((XYZ, Mag, Dir))
    #================================================================#
    #---Sort the tuples based on their magnitudes from least to greatest...
      #using sorted().
            #key = lamda x: x[1] tells the sorted function to sort the tuples...
                #based on their second component...their magnitudes--------#
    charliePoints = sorted(betaPoints, key = lambda x: x[1])
    #================================================================#
    #---Calculate parts of electric field equation:
        #E = 1/(4*pi*epsilon0) * Q/(magnitude)**2
    epsilonO = 8.854*(10**(-12)) #-N*(m/C)**2-#
    k = 1/(4*pi*(epsilonO)) #-N*(m/C)**2-#
    chargeContri = k*sourceCharge #-N*(m**2/C)-#
    #================================================================#
    #---Loop through points and find mag of electric field:
        #add it to a new list with the existing tuple info-------#
    deltaPoints = []
    for XYZ in charliePoints:
        try:  ###-Avoid divide by 0 error in (x,y,z) = (0,0,0)-###
            magEfield = chargeContri*(1/(XYZ[1])**2)
        except:
            magEfield = 0
        tupEfield = (XYZ[0], XYZ[1], XYZ[2], magEfield)
        deltaPoints.append(tupEfield)
    #================================================================#
    #---Loop through points and create an arrow at that point proportional in...
        #length to the magnitude of the electric field there.
        #Also, the arrow points in the direction of the electric field there.
        #Color coding is based on 0.25 meter increments:
            #stronger field = redder; weaker field = blue
    for XYZ in deltaPoints:
        if XYZ[1] <= 0.25:
            lengthP = XYZ[3]*0.5
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.000, 0.000),
                          length = lengthP,
                          headwidth = lengthP*0.2,
                          headlength = lengthP*0.25)
        elif XYZ[1] <= 0.5:
            lengthP = XYZ[3]*0.7
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.200, 0.000),
                          length = lengthP,
                          headwidth = lengthP*0.2,
                          headlength = lengthP*0.25)
        elif XYZ[1] <= 1:
            lengthP = XYZ[3]*0.9
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.300, 0.000),
                          length = lengthP,
                          headwidth = lengthP*0.2,
                          headlength = lengthP*0.25)
        elif XYZ[1] <= 1.25:
            lengthP = XYZ[3]*1.1
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.400, 0.000),
                          length = lengthP,
                          headwidth = lengthP*0.2,
                          headlength = lengthP*0.25)
        elif XYZ[1] <= 1.5:
            lengthP = XYZ[3]*1.3
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.500, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        elif XYZ[1] <= 1.75:
            lengthP = XYZ[3]*1.5
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.600, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        elif XYZ[1] <= 2:
            lengthP = XYZ[3]*1.7
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.700, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        elif XYZ[1] <= 2.25:
            lengthP = XYZ[3]*1.9
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.800, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        elif XYZ[1] <= 2.5:
            lengthP = XYZ[3]*2.1
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 0.900, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        elif XYZ[1] <= 2.75:
            lengthP = XYZ[3]*2.3
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = vector(1.000, 1.000, 0.000),
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)
        else:
            lengthP = XYZ[3]*2.5
            arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                          color = color.blue,
                          length = lengthP,
                          headwidth = lengthP*1,
                          headlength = lengthP*1)

Latest revision as of 11:14, 6 April 2025

CLAIMED BY LIANGYU ZHAO - SPRING 2025 Electric fields describe the space around charged particles like protons or electrons. The electric field of point charges follows the same trends as Coulomb's law for electric force: a stronger charge means a stronger field, and a further distance means a weaker field. Unlike the electric force, which is defined by a source charge, an observation charge, and the corresponding observation location, the electric field can be defined with only a source charge and an observation location. Electric fields also follow the superposition principle. The fields produced by different charges or charge segments are independent and can be added together to find the net electric field.

The Main Idea

The electric field describes how an electrically charged particle or group of particles (source charge) would affect other electrically charged objects (test charge) placed in the field. The familiar electric force may be viewed as a consequence of the test charge's interaction with the field. Every position vector [math]\displaystyle{ \vec{r} = \lt x, y, z\gt }[/math] (also works for other coordinate systems) can be associated with an electric field vector [math]\displaystyle{ \vec{E}(\vec{r}) }[/math]. Electric fields follow the superposition principle. If there are multiple source charges, the net field at a given point equals the sum of the individual fields produced by each source charge. Note the electric field is a vector, meaning it has a direction [math]\displaystyle{ \hat{E} }[/math] and a magnitude [math]\displaystyle{ E }[/math]. It is measured in N/C (Newtons per Coulomb) or V/m (Volts per meter), depending on which representation is more meaningful in context.

A Mathematical Model

Using Force

The electric field can be expressed as follows: [math]\displaystyle{ \vec{F} = q\vec{E} \Rightarrow \vec{E} = \frac{1}{q}\vec{F} = \frac{1}{q}\frac{1}{4\pi\epsilon_{0}}\frac{Qq}{r^{2}}\hat{r} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r} }[/math]

[math]\displaystyle{ \frac{1}{4\pi\epsilon_{0}} }[/math] (also represented as [math]\displaystyle{ k }[/math] or [math]\displaystyle{ k_{e} }[/math]) refers to the electric constant
[math]\displaystyle{ r }[/math] (also represented as [math]\displaystyle{ |\vec{r}| }[/math] or [math]\displaystyle{ ||\vec{r}|| }[/math]) refers to the distance between the source charge and the observation location
[math]\displaystyle{ \hat{r} }[/math] refers to the unit vector that points from the source charge to the observation location
[math]\displaystyle{ Q }[/math] refers to the charge of the source charge
[math]\displaystyle{ q }[/math] (from the initial expression) refers to the charge of the test charge

Note the inverse-square relationship between the magnitude of the field [math]\displaystyle{ E }[/math] and the distance [math]\displaystyle{ r }[/math]. Also note that [math]\displaystyle{ r }[/math] cannot equal 0, so there is no self-interaction between a point charge and itself. The asymptote at [math]\displaystyle{ r = 0 }[/math] m and the magnitude of the electric field [math]\displaystyle{ E }[/math] decaying by a factor of [math]\displaystyle{ r^{2} }[/math] can be seen below:

[math]\displaystyle{ 2 \times 10^{-15} \ \text{C} }[/math] point charge's Electric Field magnitude as a function of radius (Laurence, 2020).

Using Superposition

The [math]\displaystyle{ \vec{E} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r}_{ } }[/math] equation is valid for a single point charge. By the superposition principle, we can use this equation to find the electric field of more complicated structures like dipoles, quadrupoles, lines, spheres, shells, planes, etc. The sum can be expressed as follows: [math]\displaystyle{ \vec{E}_{net} = \sum_{i=1}^{N}\vec{E}_{i} = \vec{E}_{1} + \vec{E}_{2} + \cdots + \vec{E}_{N} }[/math]

[math]\displaystyle{ \vec{E}_{i} }[/math] refers to the field produced by one point charge
[math]\displaystyle{ N }[/math] refers to the total number of point charges

Using Electric Potential

The electric field is also related to the electric potential [math]\displaystyle{ V }[/math] (not discussed at the start of the course): [math]\displaystyle{ \Delta V = V(\vec{r_{f}}) - V(\vec{r_{i}}) = -\int_{\vec{r_{i}}}^{\vec{r_{f}}} \vec{E}(\vec{r}) \cdot \vec{dl} = - \int_{x_{i}}^{x_{f}} E_{x}dx - \int_{y_{i}}^{y_{f}} E_{y}dy - \int_{z_{i}}^{z_{f}} E_{z}dz \Rightarrow \vec{E} = - \nabla V = \lt - \frac{\partial V}{\partial x}, - \frac{\partial V}{\partial y}, - \frac{\partial V}{\partial z}\gt }[/math]

[math]\displaystyle{ \vec{r_{f}} }[/math] and [math]\displaystyle{ \vec{r_{i}} }[/math] represent the final and initial positions
[math]\displaystyle{ \vec{dl} }[/math] represents an infinitesimal length along any path
[math]\displaystyle{ \nabla V }[/math] represents the gradient of the voltage

A Computational Model

When visually drawing the electric field, the arrows point away from the positive charge and toward the negative charge. A stronger field strength can be represented by longer arrows or more densely packed arrows.

The following code can be used to visualize the electric field produced by a positive point charge. The interactive viewer may be found here: New field simulation code. Note that this code was not used to generate the exact images on this page. However, it is functionally identical to the old code and produces very similar images. For reference, the old code may be found at the bottom of the page or this link: Old field simulation code.

Normal view of simulated electric field (Laurence, 2020)
Distant view of simulated electric field (Laurence, 2020)
Rotated and zoomed in view of simulated electric field (Laurence, 2020)
GlowScript 3.2 VPython
### LIANGYU ZHAO, SPRING 2025
### VISUALIZE THE FIELD LINES PRODUCED BY A POINT CHARGE

scene.caption = """Right button drag or Ctrl-drag to rotate "camera" to view scene."""
origin = sphere(pos = vector(0, 0, 0), radius = 0.5)

### CONSTANTS
num = 5
scale = 7e-1

### GENERATE LOCATION POINTS
data = []
dist = []
for x in range(-num, num + 1):
  for y in range(-num, num + 1):
    for z in range(-num, num + 1):
      data.append([x, y, z])
      d = (x**2 + y**2 + z**2) ** 0.5
      if d not in dist:
        dist.append(d)
### GENERATE COLOR MAPPINGS
dist.sort()
dist = dist[1:]
uniq = len(dist)
step = 1 / uniq * 2
colo = [vector(1, 0, 0)]
mapp = {}
for x in range(uniq):
  if x < uniq / 2:
    colo.append(colo[x] + vector(-step, step, 0))
  else:
    colo.append(colo[x] + vector(0, -step, step))
  mapp[dist[x]] = colo[x]
### GENERATE ARROWS
for loca in data:
  posi = vector(loca[0], loca[1], loca[2])
  dir = norm(posi)
  rmag = mag(posi)
  emag = rmag ** -2
  headL = emag * scale * 5e-1
  headW = emag * scale * 5e-1
  axis = emag * dir * scale
  try: 
    acol = mapp[rmag]
  except:
    acol = vector(0, 0, 0)
  arrow(pos = posi, color = acol, headlength = headL, headwidth = headW, axis = axis)


  • Or if you prefer something with more action, explore this Hockey Game to gain a deeper visual understanding of electric fields and their effects on charges

Examples

Simple

  • Question:
In the following figure, the red circles represent positive point charges, and the blue circles represent negative point charges. If the yellow arrows are meant to represent the Electric Field due to each point charge, which field(s) and charge(s) are correctly matched? (Only take into account direction)
  • Solution:
Since Electric Field lines always point away from a positive point charge, Option (C.) cannot be correct. Likewise, Electric Field lines always point towards a negative charge. Therefore, Option (A.) is also incorrect.
Option (B.) shows a positive charge with an Electric Field pointing radially outwards. This is correct. Option (D.) shows a negative charge with an Electric Field pointing radially inwards. This is also correct.
  • More simple examples from class notes
example
example
example
example

Middling

  • Question:
Four point charges [math]\displaystyle{ \big(q_{1}, q_{2}, q_{3}, \text{and} \ q_{4} \big) }[/math], are each located at a distance [math]\displaystyle{ d }[/math] along either the [math]\displaystyle{ x }[/math] or [math]\displaystyle{ y }[/math] axes, as shown in the figure below. If [math]\displaystyle{ \ |q_{3}| = |q_{1}| \ \text{and} \ |q_{4}| = |q_{2}| }[/math] what does the Electric Field at the origin reduce to?
  • Solution:
  • A.) We can start by observing the geometry of the problem. We want the net field at the origin, and the distance between the origin and each point charge is identical. [math]\displaystyle{ r_{1} = r_{2} = r_{3} = r_{4} = d }[/math] We also need to find the unit vector [math]\displaystyle{ \hat{r} }[/math] that points from each point charge to the origin. [math]\displaystyle{ \hat{r_{1}} = -\hat{y}, \hat{r_{2}} = -\hat{x}, \hat{r_{3}} = \hat{y}, \hat{r_{4}} = \hat{x} }[/math]
  • B.) Next, we need to calculate each electric field from each point charge using [math]\displaystyle{ \vec{E} = \frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}\hat{r} }[/math].
[math]\displaystyle{ \vec{E}_{1} = k\frac{q_{1}}{r_{1}^{2}}\hat{r_{1}} = k\frac{q_{1}}{d^{2}}(-\hat{y}) = -k\frac{q_{1}}{d^{2}}\hat{y} }[/math]
[math]\displaystyle{ \vec{E}_{2} = k\frac{q_{2}}{r_{2}^{2}}\hat{r_{2}} = k\frac{q_{2}}{d^{2}}(-\hat{x}) = -k\frac{q_{2}}{d^{2}}\hat{x} }[/math]
[math]\displaystyle{ \vec{E}_{3} = k\frac{q_{3}}{r_{3}^{2}}\hat{r_{3}} = k\frac{-q_{3}}{d^{2}}\hat{y} = -k\frac{q_{1}}{d^{2}}\hat{y} }[/math]
[math]\displaystyle{ \vec{E}_{4} = k\frac{q_{4}}{r_{4}^{2}}\hat{r_{4}} = k\frac{q_{4}}{d^{2}}\hat{x} = k\frac{q_{2}}{d^{2}}\hat{x} }[/math]
  • C.) Finally, we apply the superposition principle. We can notice that the fields along the [math]\displaystyle{ \hat{x} }[/math] axis cancel out because the magnitudes are equal, but the directions are opposite. We can also observe that the fields along the [math]\displaystyle{ \hat{y} }[/math] axis create a stronger field because the directions are equal.
[math]\displaystyle{ \vec{E}_{net} = \vec{E}_{1} + \vec{E}_{2} + \vec{E}_{3} + \vec{E}_{4} = -k\frac{q_{1}}{d^{2}}\hat{y} - k\frac{q_{2}}{d^{2}}\hat{x} - k\frac{q_{1}}{d^{2}}\hat{y} + k\frac{q_{2}}{d^{2}}\hat{x} = -2k\frac{q_{1}}{d^{2}}\hat{y} }[/math]
  • More middling examples from class notes
example
example

Difficult

  • Question:
A ring of evenly distributed charge of radius [math]\displaystyle{ a }[/math] is centered on the origin in the xy-plane. The ring has a total charge [math]\displaystyle{ Q }[/math]. Show that the Electric Field due to this ring is 0 at the origin.
  • Solution:
The Electric Field due to a point charge is given by:
[math]\displaystyle{ \mathbf{E} = \frac{1}{4 \pi \epsilon_{0}} \frac{|Q|}{| \mathbf{r} - \mathbf{r}^{'} |^{2}} \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |} }[/math]
This equation is equivalent to the formula presented in the Mathematical Model. The reason it looks so different is due to a few assumptions in the mathematical model that we have stopped using:
  1. The source charge is located at the origin (our ring of charge is around the origin)
  2. The distance between the source charge and the observing location is simply expressed as a distance [math]\displaystyle{ r }[/math] (like in the Middling Example). Now, instead we will represent the distance as the magnitude of the difference in position between the source and observer [math]\displaystyle{ \big( | \mathbf{r} - \mathbf{r}^{'} | \big) }[/math].
  3. Subsequently, our unit vector in the direction of the field [math]\displaystyle{ \big( \hat{\mathbf{r}} \big) }[/math] is not simply expressed as a typical unit vector (like in the middling example). It has now become the vector joining the source and observer divided by the magnitude of this same vector [math]\displaystyle{ \bigg( \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |} \bigg) }[/math].
Another complication this problem presents is:
Where is the source charge?
To answer this, notice that the ring has an evenly distributed TOTAL charge [math]\displaystyle{ Q }[/math] and a radius [math]\displaystyle{ a }[/math]. Also, notice that the "source" position is constantly changing as you go around the ring. This issue makes it much more convenient to speak of the line charge DENSITY at a point along the ring instead of the TOTAL charge. This will allow us to treat the ring as many, many little source charges. The line charge density is simply the charge on the line divided by the length of that line (circumference), since the charge is evenly distributed about the ring:
[math]\displaystyle{ \rho_{L} = \frac{Q}{2 \pi a} }[/math]
This allows us to represent a differential amount of source charge as a product of the line charge density and a differential length:
[math]\displaystyle{ dQ = \rho_{L} dL }[/math]
The next question is: What is a differential length around the ring?
The differential length is a differential arc length [math]\displaystyle{ (s = r \theta) }[/math] around the circle dependent on the change in angle:
[math]\displaystyle{ dL = a d\theta }[/math]
Therefore:
[math]\displaystyle{ \begin{align} dQ &= \frac{Q}{2 \pi a} a d\theta \\ &= \frac{Q}{2 \pi} d\theta \\ \end{align} }[/math]
Now we can sum each of these differential source charge's contribution to the Electric Field at the origin using an integral:
[math]\displaystyle{ \mathbf{E} = \int \frac{1}{4 \pi \epsilon_{0}} \frac{\frac{Q}{2 \pi} d\theta}{| \mathbf{r} - \mathbf{r}^{'} |^{2}} \frac{\mathbf{r} - \mathbf{r}^{'}}{| \mathbf{r} - \mathbf{r}^{'} |} }[/math]
The only things left to find are the generic source position (a vector that can describe the position of each differential source charge along the ring) and the observer location. The observer location is given to us; the origin:
[math]\displaystyle{ \mathbf{r} = 0\mathbf{i} +0\mathbf{j} + 0\mathbf{k} }[/math]
The source position is easiest to describe as a radius from the origin (polar coordinates):
[math]\displaystyle{ \mathbf{r}^{'} = a \hat{ \mathbf{a}}_{r} }[/math] where [math]\displaystyle{ \hat{\mathbf{a}}_{r} }[/math] is a unit vector in the radial direction
Therefore:
[math]\displaystyle{ \begin{align} \mathbf{r} - \mathbf{r}^{'} &= \big( 0\mathbf{i} +0\mathbf{j} + 0\mathbf{k} \big) - \big( a\hat{ \mathbf{a}}_{r} \big) \\ &= -a\hat{ \mathbf{a}}_{r} \\ |\mathbf{r} - \mathbf{r}^{'}| &= \sqrt{(-a)^{2}} \\ &= a \\ \end{align} }[/math]
Plugging these into the Electric Field integral gives:
[math]\displaystyle{ \begin{align} \mathbf{E} &= \int \frac{1}{4 \pi \epsilon_{0}} \frac{\frac{Q}{2 \pi} d\theta}{a^2} \frac{-a \hat{ \mathbf{a}}_{r}}{a} \\ &= - \int \frac{1}{8 {\pi}^{2} \epsilon_{0}} \frac{Q}{a^2} \hat{ \mathbf{a}}_{r} d\theta \\ &= - \frac{Q}{a^{2} 8 {\pi}^{2} \epsilon_{0}} \int \hat{ \mathbf{a}}_{r} d\theta \\ \end{align} }[/math]
  • [math]\displaystyle{ \theta }[/math] is the angle from the x-axis.
  • To integrate over the entire ring, we set the bounds of [math]\displaystyle{ \theta }[/math] as [math]\displaystyle{ [0, 2 \pi) }[/math].
  • Also, as of right now, the integral would not evaluate to 0. This is because [math]\displaystyle{ \hat{ \mathbf{a}}_{r} }[/math] has a hidden dependence on [math]\displaystyle{ \theta }[/math]:
[math]\displaystyle{ \hat{ \mathbf{a}}_{r} = \text{cos}( \theta) \mathbf{i} + \text{sin}( \theta) \mathbf{j} }[/math]
Plugging this information in gives:
[math]\displaystyle{ \begin{alignat}{3} \mathbf{E} &= - \frac{Q}{a^{2} 8 {\pi}^{2} \epsilon_{0}} \int_{0}^{2 \pi} \big( \text{cos}( \theta) \mathbf{i} + \text{sin}( \theta) \mathbf{j} \big) d\theta \\ \int_{0}^{2 \pi} \text{cos}( \theta) \mathbf{i} \ d\theta &= 0 \\ \int_{0}^{2 \pi} \text{sin}( \theta) \mathbf{j} \ d\theta &= 0 \\ \end{alignat} }[/math]
Therefore:
[math]\displaystyle{ \mathbf{E} = 0 }[/math] at the origin.

Connectedness

The real world applications of electric fields are endless. Here are some:

  • Electric Motors:
Electric motors convert Electrical Energy into Mechanical Energy through Electric Fields. Whenever electric motors are turned on, Electric Fields are generated. This is because in order to turn an electric motor, an Electric Field must first be generated, which then generates a Magnetic Field, thus making the motor spin. Electric motors are used in cars, elevators, fans, refrigerators, and many more applications.
  • Computers:
Computers use circuits, electric fans, and transistors to work. All of these use Electric Fields to push charge through a circuit, spin fans, and allow logic to be implemented in electronics.
  • Painting:
Electric Fields are also used in some paintings. The Electric Field generates charges on the surface of the material being painted on, and an opposite charge is generated on the paint. Paint that touches the material sticks, and excess paint falls off to go back into the system.
  • Cancer Treatment:
Recently, weak Electric Fields have been used to kill cancer cells. This treatment works best for brain and breast cancers, and it has no effect on normal cells. In lab and animal tests, this treatment killed cancer cells of every type tested; however, this is still a developing treatment.
  • Military and Defense:
Electric Fields are commonly used in various weapons platforms. Weapons used to rely primarily on explosives; however, electric weapons use stored electrical energy to attack targets. There are two general types: directed-energy weapons (DEWs) and electromagnetic (EM) weapons. DEWs include lasers, radio frequency weapons, and more. EM weapons include rail guns, coil guns, etc. For example, rail guns use EM force to launch high velocity projectiles at a target. They work by using very high electrical currents to induce magnetic fields that accelerate a projectile to extremely high speeds (up to Mach 6).

History

Electric Fields are created by Electric charges. The original discovery of the Electric charge is not explicitly known, but in 1675 the esteemed chemist Robert Boyle, known for Boyle's Law, discovered the attraction and repulsion of certain particles in a vacuum. Almost 100 years later in the 18th century, the American Benjamin Franklin first coined the phrases 'positive' and 'negative' (later developed into proton and electron) for these particles with attractive and repulsive properties. Finally, in the 19th century Michael Faraday utilized his Electrolysis process to discover the discrete nature of Electric charge.

See also

The ability to understand Electric Fields helps set the basis for the introduction to Electric Force (as we discussed [math]\displaystyle{ \mathbf{F} = q\mathbf{E} }[/math] ). The introduction of Electric Force will attach the specific charge of the particles with the Electric Field that they produce, resulting in the Electric Force. Electric Force will lay the ground work for understanding the force that particles have in different systems and environments, and eventually lead to the introduction of Magnetic Force. The understanding of Electric Fields is a doorway into many various fields, only some of which will be covered in Physics 2212. The fundamental understanding of Electric Fields will prove to be very important further along when Magnetic Fields are introduced, as they share many qualities. The understanding of Electric and Magnetic Fields will be used throughout the semester to learn about various Electromagnetic concepts, and ultimately to understanding and apply Maxwell's Equations. Please see related topics:

Further reading

External links

References

Old Simulation Code

   ###--Create Electric Field Lines of a Positive Charge at the Origin--###
   #==============================================================#
   #---Import statements for VPython---#
   from __future__ import division
   from visual import *
   #---Import function used to find combinations---#
   from itertools import combinations
   #==============================================================#
   #---Create scene---#
   scene.center = vector(0,0,0)  #-Position of source charge-#
   scene.height = 800  #-Set height of frame of scene-#
   scene.width = 800  #-Set width of frame of scene-#
   scene.range = 4  #-Set range of scene-#
   scene.userzoom = 1  #-Allow user to zoom in/out: CTRL & move in/out on trackpad-#
   scene.userspin = 1  #-Allow user to rotate camera angle: SHIFT & OPTION & move around on track pad-#
   #==============================================================#
   #---Specify point charge attributes---#
   sourceCharge = 3*10**(-11)  #-Coulombs of charge-#
   sourcePos = vector(0,0,0) #-Position of source charge-#
   ###--Modeling source point charge as a sphere with radius 0.1 meters--###
   sourceObj = sphere(pos = sourcePos, radius = 0.1, color = color.cyan)
   #==============================================================#
   #---Set range (0 to 3) and possible inputs for the coordinates (0.5 step)---#
   ###--Many of the same number included to allow for combinations such as (1,1,1).
       #The itertools.combinations function will only use each element of the...
       #list once, starting from the beginning.
       #Repeating each coordinate many times with intermixing, grants...
       #all combinations of points, with repeats however.
       #Later, a for loop will be used to eliminate repeats.
       #This can be optimized later if need be.---------------###
   posXYZ = [0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3,
             0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3,
             0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3,
             0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3,
             0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3,
             0, -0.5, 1, -1.5, 2, -2.5, 3,
             0, 0.5, -1, 1.5, -2, 2.5, -3]
   #==============================================================#
   #---Create combinations of points (x,y,z) for later use---#
       ###--prelimPoints will be a list of tuples of tuples--##
           #ie: [((,,),(,,),(,,),(,,)) , ((,,),(,,)) ,..., ((,,),(,,))]
   prelimPoints = [tuple(combinations(posXYZ, 3))]
   ###--Pull the points out of the grouping tuples and add them to a...
       #new list alphaPoints------------------------###
   alphaPoints = []
   for groupingTuple in prelimPoints:
       for XYZ in groupingTuple:
           if XYZ not in alphaPoints:  #-Check for repeat (x,y,z)-#
               alphaPoints.append(XYZ)
           ##--The negative of this tuple may not be in the combinations:
               #check to see-------------##
           first = -XYZ[0]
           second = -XYZ[1]
           third = -XYZ[2]
           negXYZ = (first, second, third)
           if negXYZ not in alphaPoints:
               alphaPoints.append(negXYZ)
           ##--Swap x and z coordinates for futher combination checking--##
           first = XYZ[2]
           second = XYZ[1]
           third = XYZ[0]
           reverseXYZ = (first, second, third)
           if reverseXYZ not in alphaPoints:
               alphaPoints.append(reverseXYZ)
           ##--The negative of the x and z coordinate swap may not be in...
               #the combinations: check to see---------##
           first = -XYZ[2]
           second = -XYZ[1]
           third = -XYZ[0]
           reverseXYZneg = (first, second, third)
           if reverseXYZneg not in alphaPoints:
               alphaPoints.append(reverseXYZneg)
           ##--Make x [3], y [0], and z [1] to check for more combinations--##
           first = XYZ[1]
           second = XYZ[2]
           third = XYZ[0]
           shiftedXYZ = (first, second, third)
           if shiftedXYZ not in alphaPoints:
               alphaPoints.append(shiftedXYZ)
           ##--The negative of the shifted XYZ may not be in the combinations:
               #check to see---------------##
           first = -XYZ[1]
           second = -XYZ[2]
           third = -XYZ[0]
           shiftedXYZneg = (first, second, third)
           if shiftedXYZneg not in alphaPoints:
               alphaPoints.append(shiftedXYZneg)
   ###--------This should be enough recombining---------###
   #================================================================#
   #---Create a new list of tuples that contain the points, magnitude,...
       #and direction (betaPoints)-----------#
           #ie: [((x,y,z), mag((x,y,z)), norm((x,y,z))),...]
   betaPoints = []
   for XYZ in alphaPoints:
       Mag = mag(XYZ)
       Dir = norm(XYZ)
       betaPoints.append((XYZ, Mag, Dir))
   #================================================================#
   #---Sort the tuples based on their magnitudes from least to greatest...
      #using sorted().
           #key = lamda x: x[1] tells the sorted function to sort the tuples...
               #based on their second component...their magnitudes--------#
   charliePoints = sorted(betaPoints, key = lambda x: x[1])
   #================================================================#
   #---Calculate parts of electric field equation:
       #E = 1/(4*pi*epsilon0) * Q/(magnitude)**2
   epsilonO = 8.854*(10**(-12)) #-N*(m/C)**2-#
   k = 1/(4*pi*(epsilonO)) #-N*(m/C)**2-#
   chargeContri = k*sourceCharge #-N*(m**2/C)-#
   #================================================================#
   #---Loop through points and find mag of electric field:
       #add it to a new list with the existing tuple info-------#
   deltaPoints = []
   for XYZ in charliePoints:
       try:  ###-Avoid divide by 0 error in (x,y,z) = (0,0,0)-###
           magEfield = chargeContri*(1/(XYZ[1])**2)
       except:
           magEfield = 0
       tupEfield = (XYZ[0], XYZ[1], XYZ[2], magEfield)
       deltaPoints.append(tupEfield)
   #================================================================#
   #---Loop through points and create an arrow at that point proportional in...
       #length to the magnitude of the electric field there.
       #Also, the arrow points in the direction of the electric field there.
       #Color coding is based on 0.25 meter increments:
           #stronger field = redder; weaker field = blue
   for XYZ in deltaPoints:
       if XYZ[1] <= 0.25:
           lengthP = XYZ[3]*0.5
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.000, 0.000),
                         length = lengthP,
                         headwidth = lengthP*0.2,
                         headlength = lengthP*0.25)
       elif XYZ[1] <= 0.5:
           lengthP = XYZ[3]*0.7
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.200, 0.000),
                         length = lengthP,
                         headwidth = lengthP*0.2,
                         headlength = lengthP*0.25)
       elif XYZ[1] <= 1:
           lengthP = XYZ[3]*0.9
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.300, 0.000),
                         length = lengthP,
                         headwidth = lengthP*0.2,
                         headlength = lengthP*0.25)
       elif XYZ[1] <= 1.25:
           lengthP = XYZ[3]*1.1
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.400, 0.000),
                         length = lengthP,
                         headwidth = lengthP*0.2,
                         headlength = lengthP*0.25)
       elif XYZ[1] <= 1.5:
           lengthP = XYZ[3]*1.3
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.500, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       elif XYZ[1] <= 1.75:
           lengthP = XYZ[3]*1.5
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.600, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       elif XYZ[1] <= 2:
           lengthP = XYZ[3]*1.7
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.700, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       elif XYZ[1] <= 2.25:
           lengthP = XYZ[3]*1.9
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.800, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       elif XYZ[1] <= 2.5:
           lengthP = XYZ[3]*2.1
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 0.900, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       elif XYZ[1] <= 2.75:
           lengthP = XYZ[3]*2.3
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = vector(1.000, 1.000, 0.000),
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)
       else:
           lengthP = XYZ[3]*2.5
           arroW = arrow(pos=vector(XYZ[0]), axis=XYZ[2],
                         color = color.blue,
                         length = lengthP,
                         headwidth = lengthP*1,
                         headlength = lengthP*1)