קובץ:Gaussianbeam travelling grey.gif

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

Gaussianbeam_travelling_grey.gif(240 × 140 פיקסלים, גודל הקובץ: 231 ק"ב, סוג MIME‏: image/gif, בלולאה, 16 תמונות, 0.8 שניות)

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

תקציר

תיאור
English: Animation of the field amplitude of a propagating Gaussian beam, grey background, field amplitude in black and white.
תאריך יצירה
מקור נוצר על־ידי מעלה היצירה
יוצר Geek3
גרסאות אחרות
 
. Matplotlib עם‎‎ נוצרה ה GIF תמונת מפת סיביות

Source Code

The image is created by the following python source-code. Requirements:


Python Matplotlib source code
#!/usr/bin/env python
# -*- coding: utf8 -*-

'''
Copyright (C) 2015 Geek3, Wikimedia Foundation

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'''

from math import *
import scipy
import matplotlib.pyplot as plt
from matplotlib import animation
from PIL import Image

# settings
fname = 'gaussianbeam_travelling_grey'
width, height = 240, 140
nframes = 16
fps=20

lambda_px = 16.
w0 = 16.

def E(r, z, w0):
    z0 = pi * w0**2 / lambda_px
    w = w0 * sqrt(1. + (z / z0)**2)
    k = 2. * pi / lambda_px
    R = z * (1. + (z0 / z)**2)
    gouy = atan(z / z0)
    E = w0 / w
    E *= e ** (-(r/w)**2)
    E *= e ** (-1j * k * r**2 / (2 * R))
    E *= e ** (1j * (gouy - k * z))
    return E

def draw(nframe):
    # draw an image
    image = scipy.zeros((height, width))
    
    phase = nframe * 2 * pi / nframes
    for y in range(height):
        for x in range(width):
            z = (x + 0.5) - width / 2.0
            r = (y + 0.5) - height / 2.0
            EE = E(r, z, w0)
            image[y, x] = (EE * e**(1j*phase)).real
    return image

def animate(nframe):
    # prepare a clean and image-filling canvas for each frame
    plt.clf()
    fig.gca().set_position((0, 0, 1, 1))
    plt.xlim(-0.5, width + 0.5)
    plt.ylim(-0.5, height + 0.5)
    plt.axis('off')
    
    print 'frame', nframe
    image = draw(nframe)
    
    imgplot = plt.imshow(image, cmap='gray')
    imgplot.set_clim(-1.0, 1.0)
    imgplot.set_interpolation('nearest')

fig = plt.figure(figsize=(width/100., height/100.))
anim = animation.FuncAnimation(fig, animate, frames=nframes, repeat=False)
anim.save(fname + '.gif', writer='imagemagick', fps=fps)

רישיון

אני, בעל זכויות היוצרים על היצירה הזאת, מפרסם אותה בזאת תחת הרישיונות הבאים:
GNU head מוענקת בכך הרשות להעתיק, להפיץ או לשנות את המסמך הזה, לפי תנאי הרישיון לשימוש חופשי במסמכים של גנו, גרסה 1.2 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.
w:he:Creative Commons
ייחוס
הקובץ הזה מתפרסם לפי תנאי רישיון קריאייטיב קומונז ייחוס 3.0 לא מותאם.
הנכם רשאים:
  • לשתף – להעתיק, להפיץ ולהעביר את העבודה
  • לערבב בין עבודות – להתאים את העבודה
תחת התנאים הבאים:
  • ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.

כיתובים

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

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

מוצג

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

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

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית22:13, 12 ביולי 2015תמונה ממוזערת לגרסה מ־22:13, 12 ביולי 2015‪140 × 240‬ (231 ק"ב)Geek3animation of a propagating Gaussian beam

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