File:Synthesis square.gif

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

Synthesis_square.gif(500 × 250像素,文件大小:125 KB,MIME类型:image/gif、​循环、​53帧、​15秒)


摘要

描述
English: Additive synthesis of a square wave, illustrating Fourier series expansion and Gibbs phenomenon. See also: Image:Synthesis sawtooth.gif, Image:Synthesis triangle.gif.
日期 2005年12月19日 (上传日期)
来源 自己的作品
作者 Lucas Vieira
其他版本
BASIC source
InfoField
click to expand
' The frames of the animation can be drawn
' by the code below in BASIC. The animation
' is made by collecting the frames in an
' image editor such as GIMP.

REM Constant
pi=4*atn(1)
REM Set up plotting area
screen 12
window (0,-2)-(5*pi,2)

REM Number of terms to use
for nt=1 to 25
 cls
 print "Harmonics:";nt

 REM Plot squarewave
 pset (0,0)
 for w=0 to 5*pi step .01
  line -(w,sgn(sin(w))),4
 next w

 REM Plot sum of terms
 pset (0,0)
 for w=0 to 5*pi step .01
  y=0
  for k=1 to nt
   y=y+sin((2*k-1)*w)/(2*k-1)
  next k
  y=4*y/pi
  line -(w,y)
 next w

 REM Freeze display (create a gif animation frame)
 delay .2
next nt

许可协议

GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
本许可协议标签作为GFDL许可协议更新的组成部分被添加至本文件。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2013年8月15日 (四) 20:432013年8月15日 (四) 20:43版本的缩略图500 × 250(125 KB)LucasVBModern update: higher resolution, higher quality, language-agnostic and more visually appealing
2006年9月3日 (日) 19:452006年9月3日 (日) 19:45版本的缩略图472 × 200(34 KB)LucasVBFixed animation so the series actually converges over the idealized square wave in the illustration. Thanks Steven Johnson for pointing that out.
2005年12月19日 (一) 10:262005年12月19日 (一) 10:26版本的缩略图472 × 200(35 KB)LucasVBAdditive synthesis of a square wave

以下3个页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

查看本文件的更多全域用途