Checked content

File:Synthesis square.gif

Synthesis_square.gif(472 × 200 pixels, file size: 34 KB, MIME type: image/gif, looped, 25 frames, 4.3 s)
' 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
REM Set up plotting area
screen 12
window (0,-2)-(5*pi,2)

REM Number of terms to use
for nt=1 to 25
 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
  for k=1 to nt
  next k
  line -(w,y)
 next w

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


Additive synthesis of a square wave, illustrating Fourier series expansion and Gibbs phenomenon.

See also: Image:Synthesis sawtooth.gif, Image:Synthesis triangle.gif


GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.

w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
  • share alike – If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
This licensing tag was added to this file as part of the GFDL licensing update.

The following pages on Schools Wikipedia link to this image (list may be incomplete):

Schools Wikipedia facts

Wikipedia for Schools is designed to make learning fun and easy. By supporting vulnerable children right through to adulthood, SOS Children makes a lasting difference to the lives of thousands of people. Education is a key part of our work, and our schools provide high-quality teaching to the children in our care. There are many ways to help with SOS Childrens Villages.