File:VFPt charges plus minus thumb potential.svg
| Uploaded by | Geek3 |
|---|---|
| Upload date | 2019-09-07T22:37:33Z |
| MIME type | image/svg+xml |
| Dimensions | 220 × 165 px |
| File size | 31.1 KB |
Summary
| 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 | |
| Source code | Python codedoc = 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
I, the copyright holder of this work, hereby publish it under the following license:
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.