File:VFPt charges plus plus2.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 800 × 600 pixels, file size: 25 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Field of two positive point charges. The shape of the field lines is accurately computed. The density of lines is a compromise to approximate the field strength close to the charges and far away, which cannot be exactly achieved with a fixed set of lines.
Date
Source Own work
Author Geek3
Other versions VFPt charges plus plus.svg
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with VectorFieldPlot.
Source code
InfoField
VectorFieldPlot source
# paste this code at the end of VectorFieldPlot 1.7
doc = FieldplotDocument('VFPt_charges_plus_plus2', commons=True)
x0, y0 = -1., 0.
x1, y1 = 1., 0.
field = Field({'monopoles':[[x0, y0, 1], [x1, y1, 1]]})
doc.draw_charges(field)

def startpath(t):
    phi = 2 * pi * t
    return sc.array([x0 + 1 * cos(phi), y0 + 1 * sin(phi)])
def dstartpath(t):
    return (startpath(t+1e-6) - startpath(t-1e-6)) / 2e-6
def FieldSum(t0, t1):
    return ig.quad(lambda t:
        sc.cross(field.F(startpath(t)), dstartpath(t)), t0, t1)[0]
Ftotal = FieldSum(0, 1)
def startpos(s):
    t = op.brentq(lambda t: FieldSum(0, t) / Ftotal - s, 0, 1)
    return startpath(t)

n = 16
for i in range(n):
    p0 = startpos((0.5 + i) / n)
    for p0 in [p0, [-p0[0], p0[1]]]:
        line = FieldLine(field, p0, directions='both', maxr=3)
        doc.draw_line(line, arrows_style={'dist':3.0, 'min_arrows':1,
            'max_arrows':1, 'fixed_ends':[True, False, False, False]})
doc.write()

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
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/TimeThumbnailDimensionsUserComment
current22:06, 19 March 2018Thumbnail for version as of 22:06, 19 March 2018800 × 600 (25 KB)Geek3 (talk | contribs)User created page with UploadWizard

Metadata