File:VFPt four charges potential.svg
Original file (SVG file, nominally 600 × 600 pixels, file size: 97 KB)
Captions
Summary
[edit]DescriptionVFPt four charges potential.svg |
English: Electric field of two positive and two negative point charges constituting a non-ideal electric quadrupole. The electric potential is shown by the background color, where yellow is neutral. |
Date | |
Source | Own work |
Author | Geek3 |
Other versions |
|
SVG development InfoField | |
Source code InfoField | Python code# paste this code at the end of VectorFieldPlot 1.10
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
doc = FieldplotDocument('VFPt_four_charges_potential',
width=600, height=600, commons=True)
charges = [[-1,0,-1], [0,1,1], [1,0,-1], [0,-1,1]]
field = Field({'monopoles':charges})
doc.draw_charges(field)
# draw potential in background
p_array = sc.array([c[:2] for c in charges])
q_array = sc.array([c[2] for c in charges])
def potential(xy):
return sc.dot(q_array, 1. / sc.linalg.norm(xy - p_array, axis=1))
from matplotlib import colors
# colormap from aqua through yellow to fuchsia
cmap = colors.ListedColormap([sc.clip((2*x, 2*(1-x), 4*(x-0.5)**2), 0, 1)
for x in sc.linspace(0., 1., 2048)])
U0 = potential(sc.array([0, 1.15]))
doc.draw_scalar_field(func=potential, cmap=cmap, vmin=-U0, vmax=U0)
n = 8
Fsum = ig.quad(lambda t: sc.dot(field.F([.5*sin(t), 1-0.5*cos(t)]),
[sin(t), -cos(t)]), 0, pi)[0]
for i in range(n):
a = (i + 0.5) / n
w = op.brentq(lambda w: ig.quad(lambda t: sc.dot(field.F([0.5*sin(t),
1-0.5*cos(t)]), [sin(t), -cos(t)]), 0, w)[0] - a * Fsum, 0, pi)
for w1 in range(4):
line = FieldLine(field, rot([.5*sin(w), 1.0-0.5*cos(w)], w1 * pi/2),
directions='both')
doc.draw_line(line, arrows_style={'dist':1.5})
doc.write()
|
Licensing
[edit]- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 20:47, 30 December 2018 | 600 × 600 (97 KB) | Geek3 (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Short title | VFPt_four_charges_potential |
---|---|
Image title | VFPt_four_charges_potential
created with VectorFieldPlot 1.10 https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot about: https://commons.wikimedia.org/wiki/File:VFPt_four_charges_potential.svg rights: Creative Commons Attribution ShareAlike 4.0 |
Width | 600 |
Height | 600 |