انتقل إلى المحتوى

ملف:Magnetic field of an idealized sextupole.svg

محتويات الصفحة غير مدعومة بلغات أخرى.
من ويكيبيديا، الموسوعة الحرة

الملف الأصلي(ملف SVG، أبعاده 540 × 540 بكسل، حجم الملف: 180 كيلوبايت)

ملخص

الوصف
English: Magnetic field of an idealized sextupole
التاريخ
المصدر python/matplotlib
المؤلف Andre.holzner
SVG منشأ الملف
InfoField
 
The source code of this SVG is invalid due to an error.
 
هذا الرسم المتجهي أُنشئ بواسطة 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 يسمح نسخ وتوزيع و/أو تعديل هذه الوثيقة تحت شروط رخصة جنو للوثائق الحرة، الإصدار 1.2 أو أي إصدار لاحق تنشره مؤسسة البرمجيات الحرة؛ دون أقسام ثابتة ودون نصوص أغلفة أمامية ودون نصوص أغلفة خلفية. نسخة من الرخصة تم تضمينها في القسم المسمى GNU Free Documentation License.
w:ar:مشاع إبداعي
نسب العمل إلى مُؤَلِّفه الإلزام بترخيص المُشتقات بالمثل
يحقُّ لك:
  • مشاركة العمل – نسخ العمل وتوزيعه وبثُّه
  • إعادة إنتاج العمل – تعديل العمل
حسب الشروط التالية:
  • نسب العمل إلى مُؤَلِّفه – يلزم نسب العمل إلى مُؤَلِّفه بشكل مناسب وتوفير رابط للرخصة وتحديد ما إذا أجريت تغييرات. بالإمكان القيام بذلك بأية طريقة معقولة، ولكن ليس بأية طريقة تشير إلى أن المرخِّص يوافقك على الاستعمال.
  • الإلزام بترخيص المُشتقات بالمثل – إذا أعدت إنتاج المواد أو غيرت فيها، فيلزم أن تنشر مساهماتك المُشتقَّة عن الأصل تحت ترخيص الأصل نفسه أو تحت ترخيص مُتوافِقٍ معه.
لك أن تختار الرخصة التي تناسبك.

الشروحات

أضف شرحاً من سطر واحد لما يُمثِّله هذا الملف

العناصر المصورة في هذا الملف

يُصوِّر

١٥ ديسمبر 2012

تاريخ الملف

اضغط على زمن/تاريخ لرؤية الملف كما بدا في هذا الزمن.

زمن/تاريخصورة مصغرةالأبعادمستخدمتعليق
حالي23:34، 15 ديسمبر 2012تصغير للنسخة بتاريخ 23:34، 15 ديسمبر 2012540 × 540 (180 كيلوبايت)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...

الصفحة التالية تستخدم هذا الملف:

الاستخدام العالمي للملف

الويكيات الأخرى التالية تستخدم هذا الملف:

بيانات وصفية