לדלג לתוכן

קובץ:Magnetic field of an idealized dipole.svg

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

לקובץ המקורי(קובץ SVG, הגודל המקורי: 540 × 540 פיקסלים, גודל הקובץ: 142 ק"ב)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור
English: magnetic field of an idealized dipole
תאריך יצירה
מקור python/matplotlib
יוצר Andre.holzner
SVGהתפתחות 
InfoField
 
קוד המקור של קובץ SVG זה הוא לא תקין בגלל שגיאה.
 
Matplotlib עם‎‎ נוצרה ה W3C-לא תקין גרפיקה וקטורית
 
The file size of this SVG plot may be irrationally large because its text has been converted to paths inhibiting translations.
קוד מקור
InfoField

Python 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 = 1

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 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.
w:he:Creative Commons
ייחוס שיתוף זהה
הקובץ הזה מתפרסם לפי תנאי רישיון קריאייטיב קומונז ייחוס-שיתוף זהה 3.0 לא מותאם.
הנכם רשאים:
  • לשתף – להעתיק, להפיץ ולהעביר את העבודה
  • לערבב בין עבודות – להתאים את העבודה
תחת התנאים הבאים:
  • ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
  • שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית12:05, 16 בדצמבר 2012תמונה ממוזערת לגרסה מ־12:05, 16 בדצמבר 2012‪540 × 540‬ (142 ק"ב)Andre.holznerchanged axis range such that no lines are drawn outside the coordinate frame on some SVG renderers
02:23, 16 בדצמבר 2012תמונה ממוזערת לגרסה מ־02:23, 16 בדצמבר 2012‪540 × 540‬ (140 ק"ב)Andre.holzner{{subst:Upload marker added by en.wp UW}} {{Information |Description = {{en|magnetic field of an idealized dipole}} |Source = python/matplotlib |Date = 2012-12-15 |Author = Andre.holzner }} ;Other information: {{en|from pylab im...

אין בוויקיפדיה דפים המשתמשים בקובץ זה.

שימוש גלובלי בקובץ

אתרי הוויקי השונים הבאים משתמשים בקובץ זה:

מטא־נתונים