File:VFPt charges plus plus2.svg

Summary

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
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

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.
Category:CC-BY-SA-4.0#VFPt%20charges%20plus%20plus2.svgCategory:Self-published work
Category:Photos by User:Geek3 Category:Electric fields around charges Category:Electric field lines Category:VFPt electric and magnetic fields (image set)
Category:CC-BY-SA-4.0 Category:Electric field lines Category:Electric fields around charges Category:Photos by User:Geek3 Category:Self-published work Category:VFPt electric and magnetic fields (image set) Category:Valid SVG created with VectorFieldPlot code