File:VFPt dipole point.svg

From formulasearchengine
Jump to navigation Jump to search

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

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: A perfect dipole field originating from one point.
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

# paste this code at the end of VectorFieldPlot 1.2
doc = FieldplotDocument('VFPt_dipole_point',
    commons=True, width=600, height=600)
field = Field({'dipoles':[[0,0,1,0]]})
n = 16
for i in range(n):
    phi = 2.*pi * (i + 0.5) / n
    a = (-0.5 + (i + 0.5) / n)
    a = a * 3.8e-6 + 1.2e-6 * a**3
    line = FieldLine(field, [0, 0], start_d=[0.0001, a],
        directions='forward', pass_dipoles=0)
    doc.draw_line(line, linewidth=2.4,
        arrows_style={'dist':1.8, 'scale':1.1})

# draw dipole symbol
symb = doc.draw_object('g', {'id':'dipole_symbol',
    'transform':'scale({0},{0})'.format(1.5/doc.unit)})
defs = doc.draw_object('defs', {}, group=symb)
spot = doc.draw_object('radialGradient', {'id':'light_spot',
    'cx':'0.65', 'cy':'0.7', 'r':'0.75'}, group=defs)
for col, of in [['#fff', '0'], ['#ddd', '0.15'],
                ['#aaa', '0.7'], ['#444', '1']]:
    doc.draw_object('stop', {'stop-color':col, 'offset':of}, group=spot)
doc.draw_object('circle', {'cx':'0', 'cy':'0', 'r':'14',
    'style':'fill:url(#light_spot); stroke:#000000; stroke-width:2'},
    group=symb)
doc.draw_object('path', {'style':'fill:#000000; stroke:none',
    'd':'M -8,2 H 0 V 8 L 10,0 L 0,-8 V -2 H -8 V 2 Z'}, group=symb)

doc.write()

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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.
You may select the license of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

September 2010

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:18, 28 September 2010Thumbnail for version as of 16:18, 28 September 2010600 × 600 (26 KB)wikimediacommons>Geek3own work

There are no pages that use this file.