File:Quadrupole-potential-contour-xy.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
![File:Quadrupole-potential-contour-xy.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Quadrupole-potential-contour-xy.svg/540px-Quadrupole-potential-contour-xy.svg.png?20190829225406)
Size of this PNG preview of this SVG file: 540 × 540 pixels. Other resolutions: 240 × 240 pixels | 480 × 480 pixels | 768 × 768 pixels | 1,024 × 1,024 pixels | 2,048 × 2,048 pixels.
Original file (SVG file, nominally 540 × 540 pixels, file size: 154 KB)
File information
Structured data
Captions
Captions
Add a one-line explanation of what this file represents
Summary
[edit]DescriptionQuadrupole-potential-contour-xy.svg |
English: Contour plot of the equipotential surfaces of an electric quadrupole field of a point-like quadrupole. The field is accurately computed from a physical model. The quadrupole tensor is |
Date | |
Source | Own work |
Author | Geek3 |
SVG development InfoField | ![]() This plot was created with Matplotlib. |
Source code InfoField | Python codeimport numpy as np
from matplotlib import pyplot as plt
from matplotlib import colors
def simplify_contours(qcset, thresh=plt.rcParams['path.simplify_threshold']):
for c in qcset.collections:
paths = c.get_paths()
for i, p in enumerate(paths):
p.simplify_threshold = thresh / plt.gcf().dpi
paths[i] = p.cleaned(simplify=True)
# quadrupole tensor of positive charges in xy-direction and negative in -xy
Q = np.array([[0, 6., 0], [6., 0, 0], [0, 0, 0]])
xmax = 3.2
vmax = 0.15
ngrid = 400
levels = np.linspace(-vmax, vmax, 22)
XYZ = np.mgrid[-xmax:xmax:ngrid*1j, -xmax:xmax:ngrid*1j, 0:0:1j]
X, Y = XYZ[0,:,:,0], XYZ[1,:,:,0]
V = np.zeros_like(X)
for i in range(ngrid):
for j in range(ngrid):
r = XYZ[:,i,j,0]
d = np.linalg.norm(r)
V[i,j] = 0.5 * r.dot(Q).dot(r) / (4. * np.pi * d**5)
V = np.clip(V, -2.*vmax, 2.*vmax)
plt.figure(figsize=(6, 6)).add_axes([0, 0, 1, 1])
contf = plt.contourf(X, Y, V, levels=levels, cmap='RdBu_r', extend='both',
norm=colors.SymLogNorm(linthresh=0.07, vmin=-vmax, vmax=vmax))
simplify_contours(contf, 0.9*plt.rcParams['lines.linewidth'])
cont = plt.contour(X, Y, V, levels=contf.levels, colors='k', linestyles='solid')
plt.xticks([]), plt.yticks([])
plt.gca().set_aspect(aspect='equal')
plt.gca().axis('off')
for i in -1,1:
for j in -1,1:
plt.text(.2*i, .2*j, {-1:u'\u2212', 1:'+'}[i*j],
size=18, ha='center', va='center')
plt.savefig('Quadrupole-potential-contour-xy.svg')
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- 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 | 22:54, 29 August 2019 | ![]() | 540 × 540 (154 KB) | Geek3 (talk | contribs) | larger area of first potential level |
22:43, 29 August 2019 | ![]() | 540 × 540 (149 KB) | Geek3 (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
- Usage on en.wikibooks.org
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.
Width | 432pt |
---|---|
Height | 432pt |