मूल चित्र(SVG फ़ाइल, साधारणतः 540 × 540 पिक्सेल, फ़ाइल का आकार: 180 KB)

सारांश

विवरण
English: Magnetic field of an idealized sextupole
दिनांक
स्रोत python/matplotlib
लेखक Andre.holzner
SVG genesis
InfoField
 
The source code of this SVG is invalid due to an error.
 
इस W3Cअमान्य वेक्टर चित्र को Matplotlib की मदद से बनाया गया था।
मूल कोड
InfoField
Matplotlib source code
from pylab import *

xpoints = arange(-6,6,0.05)
ypoints = arange(-6,6,0.05)
X,Y = meshgrid(xpoints, ypoints)

circularMask = False

areaRadius = 4

# order of the magnet
n = 3

def func(x,y):
    # the function to draw
    return ((x + 1j * y)**(n)).real

func = vectorize(func)

V = func(X,Y)


# mask points which we don't want to draw
if circularMask:
    # circular mask
    distance = sqrt(X**2 + Y**2)
    V = ma.masked_where(distance > areaRadius, V)
else:
    # polygonal mask

    # principal directions are at  (i + 0.5) / (2n) * 2pi
    # 
    for i in range(2*n):
        angle = (i + 0.5) / float(2*n) * 2*pi
    
        # define a straight angle perpendicular to angle
        # mask all points on one side of this line
        anchor_x = areaRadius * cos(angle)
        anchor_y = areaRadius * sin(angle)

        normal_x = cos(angle)
        normal_y = sin(angle)
        
        def acceptFunc(x,y):
            value = (x - anchor_x) * normal_x + (y - anchor_y) * normal_y
            return value > 0
        
        acceptFunc = vectorize(acceptFunc)
        
        V = ma.masked_where(acceptFunc(X,Y), V)        

    
    
if True:
    # levels equidistant in function value

    V /= V.max()

    levels = arange(-2,2,0.05)

else:
    # levels equidistant on x and y axis

    # determine the levels to draw from values on one of the axes

    levels = [ float(func(x,0)) for x in arange(min(xpoints), max(xpoints),0.50) ] + \
        [ float(func(0,y)) for y in arange(min(ypoints), max(ypoints),0.50) ]
    levels = sorted(list(set(levels)))

    
figure(figsize=(6,6)); 
Q = contour(X,Y, V, colors=  'black', linestyles = 'solid', 
    levels = levels
)
axis([-5,5,-5,5])
xlabel("x coordinate")
ylabel("y coordinate")

# mask points which we don't want to draw
if not circularMask:
    # polygonal mask

    # principal directions are at  (i + 0.5) / (2n) * 2pi
    # 
    for i in range(2*n):
        angle = (i + 0.5) / float(2*n) * 2*pi
        
        if i % 2:
            label = "N"
            color = 'red'
        else:
            label = "S"
            color = 'green'
        
        anchor_x = 1.1 * areaRadius * cos(angle)
        anchor_y = 1.1 * areaRadius * sin(angle)

        text(anchor_x, anchor_y, label, size = 20, color = color,
             horizontalalignment='center',
             verticalalignment='center')

लाइसेंस

मैं, इस कार्य का/की कॉपीराइट धारक, इसे निम्न लाइसेंसों के अंतर्गत प्रकाशित करता/करती हूँ:
GNU head इस दस्तावेज़ को Free Software Foundation द्वारा प्रकाशित GNU मुक्त प्रलेख लाइसेंस के संस्करण 1.2 या नए (बिना किसी अपरिवर्तनीय अनुभागों और अगले या पिछले आवरण के टेक्स्ट के) के अंतर्गत प्रतिलिपि बनाने, बाँटने और/या बदलने की अनुमति प्रदान की जाती है। इस लाइसेंस की एक प्रतिलिपि GNU मुक्त प्रलेख लाइसेंस नामक अनुभाग में शामिल है।
w:hi:क्रिएटिव कॉमन्स
श्रेय समानसांझा
इस फ़ाइल को क्रिएटिव कॉमन्स श्रेय-समानसांझा 3.0 अनरिपोर्टेड लाइसेंस के अंतर्गत लाइसेंस किया गया है।
आप खुलकर:
  • बाँट सकते हैं – रचना की प्रतिलिपि बना सकते हैं, बाँँट सकते हैं और संचारित कर सकते हैं
  • रीमिक्स कर सकते हैं – कार्य को अनुकूलित कर सकते हैं
निम्नलिखित शर्तों के अंतर्गत:
  • श्रेय – यह अनिवार्य है कि आप यथोचित श्रेय प्रदान करें, लाइसेंस की कड़ी प्रदान करें, और अगर कोई बदलाव हुए हों तो उन्हें इंगित करें। आप ऐसा किसी भी उचित तरीके से कर सकते हैं, लेकिन किसी भी तरह उससे यह नहीं संकेत नहीं किया जाना चाहिए कि लाइसेंसधारी द्वारा आपको अथवा आपके इस प्रयोग का समर्थन किया जा रहा हो।
  • समानसांझा – अगर आप इस रचना में कोई बदलाव करते हैं या इसपर आधारित कुछ रचित करते हैं तो आप अपने योगदान को सिर्फ इसी या इसके सामान किसी लाइसेंस के अंतर्गत बाँट सकते हैं।
आप अपना पसंद का लाइसेंस चुन सकते हैं।

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

चित्रण

१५ दिसम्बर 2012

चित्र का इतिहास

फ़ाइलका पुराना अवतरण देखने के लिये दिनांक/समय पर क्लिक करें।

दिनांक/समयथंबनेलआकारसदस्यप्रतिक्रिया
वर्तमान23:34, 15 दिसम्बर 201223:34, 15 दिसम्बर 2012 के संस्करण का थंबनेल संस्करण540 × 540 (180 KB)Andre.holzner{{subst:Upload marker added by en.wp UW}} {{Information |Description = {{en|Magnetic field of an idealized sextupole}} |Source = python/matplotlib |Date = 2012-12-15 |Author = Andre.holzner }} ;Other information: {{en|from pylab...

निम्नलिखित पन्ने इस चित्र से जुडते हैं :

चित्र का वैश्विक उपयोग

इस चित्र का उपयोग इन दूसरे विकियों में किया जाता है:

मेटाडेटा