File:VFPt metal ball grounded.svg

From KYNNpedia

Original file(SVG file, nominally 600 × 600 pixels, file size: 22 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: Field of a positive point charge influenced by a grounded conducting metal sphere.
Date
Source Own work
Author Geek3
Other versions
SVG development
InfoField
 
The source code of this SVG is invalid due to VectorFieldPlot errors.
 
This W3C-invalid vector image was created with Inkscape, or with something else.
This image has been assessed using the Quality image guidelines and is considered a Quality image.

العربية  جازايرية  беларуская  беларуская (тарашкевіца)  български  বাংলা  català  čeština  Cymraeg  Deutsch  Schweizer Hochdeutsch  Zazaki  Ελληνικά  English  Esperanto  español  eesti  euskara  فارسی  suomi  français  galego  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  italiano  日本語  Jawa  ქართული  кыргызча  한국어  kurdî  Lëtzebuergesch  lietuvių  македонски  മലയാളം  मराठी  Bahasa Melayu  Nederlands  Norfuk / Pitkern  polski  português  português do Brasil  qaraqalpaqsha  rumantsch  română  русский  sicilianu  slovenčina  slovenščina  shqip  српски / srpski  svenska  தமிழ்  తెలుగు  ไทย  Tagalog  toki pona  Türkçe  українська  Oʻzbekcha  vèneto  Tiếng Việt  中文  中文(简体)  中文(繁體)  +/−

Source code
InfoField

SVG code

VectorFieldPlot source code
# paste this code at the end of VectorFieldPlot 1.1
u = 120.0
doc = FieldplotDocument('VFPt_metal_ball_grounded', commons=True,
    width=600, height=600, center=[320, 300], unit=u)
# draw symbols
field = Field({'monopoles':[[-1,0,1]]}); doc.draw_charges(field)
field = Field({'monopoles':[[0.5,0,-0.5]]}); doc.draw_charges(field, scale=sqrt(0.5))
ball = doc.draw_object('g', {'id':'metal_ball', 'transform':'translate(1,0)',
    'style':'fill:none; stroke:#000;stroke-linecap:square'})
# draw the rod
grad1 = doc.draw_object('linearGradient', {'id':'rod_shade', 'x1':0, 'x2':0,
    'y1':0, 'y2':1, 'gradientUnits':'objectBoundingBox'}, group=ball)
for col, of in (('#666', 0), ('#ddd', 0.6), ('#fff', 0.7), ('#ccc', 0.75), ('#888', 1)):
    doc.draw_object('stop', {'offset':of, 'stop-color':col}, group=grad1)
doc.draw_object('rect', {'x':0.9, 'width':0.7, 'y':-0.1/1.2+0.01, 'height':0.2/1.2-0.02,
    'style':'fill:url(#rod_shade); stroke-width:0.02'}, group=ball)
# draw the metal ball
grad = doc.draw_object('radialGradient', {'id':'metal_spot', 'cx':'0.53', 'cy':'0.54',
    'r':'0.55', 'fx':'0.65', 'fy':'0.7', 'gradientUnits':'objectBoundingBox'}, group=ball)
for col, of in (('#fff', 0), ('#e7e7e7', 0.15), ('#ddd', 0.25), ('#aaa', 0.7), ('#888', 0.9), ('#666', 1)):
    doc.draw_object('stop', {'offset':of, 'stop-color':col}, group=grad)
doc.draw_object('circle', {'cx':0, 'cy':0, 'r':1,
    'style':'fill:url(#metal_spot); stroke-width:0.02'}, group=ball)
ball_charges = doc.draw_object('g', {'style':'stroke-width:0.01667'}, group=ball)
# draw actual field
field = Field({'monopoles':[[-1,0,1], [0.5,0,-0.5]]})
n = 23
for i in range(n):
    a = (0.5 + i) / n
    phi = 2*pi * a
    line = FieldLine(field, [-1,0], start_v=[cos(phi), sin(phi)], directions='forward')
    fe = [True, False, False, False]
    of = [0.5, 0.5, 0.5, 0.5]
    # make little charge signs
    if vabs(line.get_position(1) - sc.array([1,0])) < 1:
        t = op.brentq(lambda t: vabs(line.get_position(t) - sc.array([1,0]))-1, 0, 1)
        alpha = atan2(line.get_position(t)[1], line.get_position(t)[0]-1)
        doc.draw_object('path', {'d':'M {0:.5f},{1:.5f} h {2:.5f}'.format(
            round((u*(0.9*cos(alpha)))-2)/u,
            round(u*(0.9*sin(alpha)))/u, 4/u)}, group=ball_charges)
        if abs(i-(n-1.0)/2) < n/2-2:
            fe = [True, False, False, True]
            of = [0.5, 0.5, 0.5, (0.25+vabs(line.get_position(t)-sc.array([0.5,0]))) / 1.5]
    doc.draw_line(line, arrows_style={'dist':1.5, 'min_arrows': 1, 'offsets':of, 'fixed_ends':fe})
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

June 2010

image/svg+xml

File history

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

Date/TimeThumbnailDimensionsUserComment
current15:10, 19 June 2010Thumbnail for version as of 15:10, 19 June 2010600 × 600 (22 KB)wikimediacommons>Geek3rod added

The following page uses this file:

Metadata