File:VFPt rotating-charged-sphere-approx-(rings,7-wires).svg

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

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

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: appoximate magnetic field of a rotating charged sphere (7 ringcurrents; current decreases with cos() to the poles)
Date
Source Own work
Author MikeRun
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 3.0
import math

doc = FieldplotDocument('VFPt_rotating-charged-sphere-approx-(7-wires)',  width=600, height=600, commons=True)
additional_wires_per_hemisphere = 3
total_wires = 2*additional_wires_per_hemisphere+1
sphere_radius = 1
current_max = 1
currents = [[0,0,0,sphere_radius,current_max]]
phi = math.pi/(2*total_wires)
for i in range(additional_wires_per_hemisphere):
    for j in [-1,1]:
        currents.append([j*math.sin((2*(i+1))*phi)*sphere_radius,0,0,math.cos((2*(i+1))*phi)*sphere_radius,math.cos((2*(i+1))*phi)*current_max])
field = Field({'ringcurrents':currents})
for x0, y0, off in [[-0.3719,-1.2553,0], [0.3719,-1.2553,0],
    [0.,-0.9802,0], [0.,-0.7820,0], [0.,-0.6297,.5], [0.,-0.4882,.5],
    [0.,-0.3490,.5], [0.,-0.2098,.5], [0.,-0.0700,.5], [0.,0.0700,.5],
    [0.,0.2098,.5], [0.,0.3490,.5], [0.,0.4882,.5], [0.,0.6297,.5],
    [0.,0.7820,0], [0.,0.9802,0], [-0.3719,1.2553,0], [0.3719,1.2553,0]]:
    line = FieldLine(field, [x0, y0], directions='both', maxr=5)
    doc.draw_line(line, arrows_style={'dist':2,
        'min_arrows':1, 'max_arrows':4, 'offsets':[off,0.5,0.5,1.0-off]})
doc.draw_currents(field)
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
current11:09, 2 April 2021Thumbnail for version as of 11:09, 2 April 2021600 × 600 (79 KB)MikeRun (talk | contribs)Uploaded own work with UploadWizard

Metadata