File:VFPt charges plus minus thumb potential.svg

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

Original file(SVG file, nominally 220 × 165 pixels, file size: 31 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Accurately computed electric field of a positive and a negative point charge. Thumbnail version. The electric potential is shown as the background color.
Date
Source Own work
Author Geek3
Other versions
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with VectorFieldPlot.
Source code
InfoField

Python code

doc = FieldplotDocument('VFPt_charges_plus_minus_thumb_potential',
    width=220, height=165, unit=30., commons=True)
charges = [{'x':-1, 'y':0, 'Q':1}, {'x':1, 'y':0, 'Q':-1}]
field = Field([ ['monopole', par] for par in charges])
doc.draw_charges(field, scale=11./14.)

# draw potential in background
U0 = field.V(sc.array([-1. - 15./30. * 11./14., 0.]))
doc.draw_scalar_field(func=field.V, cmap=doc.cmap_AqYlFs, vmin=-U0, vmax=U0)

nlines = 16
for iline in range(nlines):
    a = 2.0 * pi * (0.5 + iline) / nlines
    if fabs(iline - (nlines - 1) / 2.) > 6.:
        fix = {'start':False, 'leave_image':False, 'enter_image':False, 'end':False}
    else:
        fix = {'start':True, 'leave_image':False, 'enter_image':False, 'end':True}
    line = FieldLine(field, [-1,0], start_v=[cos(a), sin(a)],
        directions='forward')
    doc.draw_line(line, linewidth=1.0, arrows_style={
        'dist':1.6, 'min_arrows':1, 'fixed_ends':fix, 'scale':1.4,
        'offsets':{'start':0.65, 'leave_image':0.5, 'enter_image':0.5, 'end':0.65} })
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:37, 7 September 2019Thumbnail for version as of 22:37, 7 September 2019220 × 165 (31 KB)Geek3 (talk | contribs)User created page with UploadWizard

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata