home *** CD-ROM | disk | FTP | other *** search
/ com!online 2002 May / comcd0502.iso / homepage / javaspecial / 05_01 / Encyclo / index.xh < prev    next >
Encoding:
Text File  |  2001-01-04  |  7.6 KB  |  215 lines

  1.     Title    :    Harmonograms, Spirographs, and Lissajous Figures
  2.     Author    :    AR
  3.     Base    :    http://EncycloZine.com/Mathematics/Graphs/Encyclo/
  4.     Xlinks    :    
  5.         @(/WD/Java/,Java), @Mathematics, @Science,
  6.         @(/Illusion/,Optical Illusions and Moiré Patterns)
  7.         +++
  8.  
  9. &    Math/51.34-33.65c_t.gif    /Gallery/Math/
  10.         Icons/java_registered.gif    http://jars.com/    &
  11. [Intro
  12.     @(800x600.html,Encyclogram) 
  13.     draws _harmonograms, spirographs_, and _Lissajous figures_.
  14.     The decaying motion of the plot fills in the shapes with their
  15.     spiralling-in echo. 
  16.     Encyclogram can also draw the curves in varying colors against a black
  17.     background, resulting in breath-taking works of art that can be as
  18.     beautiful as @fractals. See the @(/Gallery/Math/,gallery of examples).
  19.     ]
  20. +
  21.     *Harmonograms* are mathematically the sums of several harmonic motions
  22.     in the _x_ and _y_ directions, decayed over time. 
  23.     If the decay is removed, and there are only two harmonic motions
  24.     (sinusoids), one in x and one in y, then the graphs are
  25.     _Lissajous figures_. If another harmonic motion is added to each
  26.     axis, and they are all in a specific phase relationship, then
  27.     _spirographs_ can be generated. These are better-known as the result of
  28.     rolling a (toothed) wheel around inside another wheel, with a pencil
  29.     point through a hole in the rolling wheel.
  30. %
  31.     You don't have to know any mathematics to use *Encyclogram*
  32.     (though if you're studying trigonometry you'll find this applet is
  33.     an interesting example of what can be done with _sine_ curves!).
  34.     Simply move the sliders around, and try the check boxes.
  35.     Here's how it works:
  36. %
  37.     For a quick start, click the *Random* button a few times;
  38.     then check the *Spiro* box and click on *Random* a few times more.
  39.     Check the *Color* button (and wait - it'll be slower).
  40. %
  41.     At the left of the applet are two sets of x-pendulum controls;
  42.     at the right of the applet are two sets of y-pendulum controls.
  43.     *x* is the horizontal direction in the drawing area, and 
  44.     *y* is the vertical direction.
  45.     Each pendulum (2 per axis) has an _amplitude, frequency,_ and
  46.     _phase_.
  47. -
  48. <table    align="left" cellpadding="16">
  49. <caption>@(640x480.html,640x480), @(800x600.html,800x600), @(1024x768.html,1024x768)
  50.     </caption>
  51. <tr><th>
  52. <applet    code    = "Encyclo.class"
  53.     archive    = "Encyclo.zip"
  54.     width    = "400"
  55.     height    = "250">
  56. </applet>
  57. </th></tr>
  58. </table>
  59. +
  60.     *Frequency* generally has the greatest effect, controlling the
  61.     number of lobes.
  62.     *Amplitude* controls the lobe sizes.
  63.     *Phase* controls lobe orientations.
  64.     *Spiro* gangs the x and y amplitude and frequency controls,
  65.     and sets the phases for symmetric spirographs.
  66.     *Decay* makes the curve spiral inwards.
  67.     *Color* sets a black background, and draws the picture in color.
  68.     WARNING: selecting the color option slows down the picture drawing.
  69.     *Thick* draws a thick line. This also slows the drawing speed.
  70. %
  71.     *Harmonograms:*
  72.     select the _decay_ option.
  73. %
  74.     *Spirographs:*
  75.     select the _spiro_ option.
  76.     Leave the _phases_ alone for true spirographs.
  77.     You can change them for interesting effects,
  78.     but the pictures won't then generally be spirographs.
  79. %
  80.     *Lissajous:*
  81.     unselect _spiro_ and _decay_.
  82.     Set one amplitude on each side to zero; 
  83.     adjust the sliders in the non-zero groups
  84.     (e.g. if you set the top sliders each side to zero,
  85.     adjust the _bottom_ three sliders).
  86. -
  87. 2    @(Encyclo.zip,FREE for your website!)
  88. +
  89.     Click on the above link to download a zip file of the classes and HTML.
  90. %
  91.     After conducting several searches, I believe this applet is unique in
  92.     being the only one that makes it easy to draw spirographs and Lissajous
  93.     figures, as special cases of harmonograms. The most popular applet for 
  94.     drawing so-called spirographs actually approximates them with overly
  95.     long straight line segments, and has a few other weaknesses which 
  96.     Encyclogram remedies.
  97.     There are very few applets drawing these kinds of curves.
  98. %
  99.     Encyclogram will appeal to mathematicians and physicists,
  100.     as an example of the resultant trace of perpendicular damped harmonic
  101.     motions; to artists
  102.     and graphic designers as a tool for exploring patterns in curves;
  103.     and to almost everyone as a fun visual toy. Web designers may add it
  104.     to their sites for visitors' use and entertainment. Teachers especially
  105.     could use it to illustrate aspects of physics, maths, and art.
  106. -
  107. 2    Future Plans:
  108. (
  109. *    Add an animation mode.
  110. *    Display the curve's equation?
  111. *    Allow to change the rate of decay?
  112. *    Allow to select some preset curves?
  113. *    Allow variation of the drawing increment?
  114. *    Document the mathematics of harmonograms etc.
  115. *    Allow initial display to be set by external parameters.
  116. *    Create a version w/o explicit controls, e.g. for page decor.
  117. )
  118. 2    A Little Math
  119. 3    Harmonograph
  120. +
  121.     Mathematically, a typical 4-pendulum harmonograph may be modelled by
  122. -
  123. `
  124. x = ( Ax1 * sin ( Fx1 * t + Px1 ) + Ax2 * sin ( Fx2 * t + Px2 ) ) * dk
  125. y = ( Ay1 * sin ( Fy1 * t + Py1 ) + Ay2 * sin ( Fy2 * t + Py2 ) ) * dk
  126. '
  127. +
  128.     where the As are amplitudes,
  129.     the Fs are frequencies, 
  130.     the Ps are phases, and
  131.     ~dk = exp ( -k * t )~, for some constant k.
  132. -
  133. 3    Spirograph
  134. +
  135.     The spirograph is
  136. -
  137. `
  138. x = ( R + r ) * cos ( t ) - ( r + O ) * cos ( ( (R + r ) / r ) * t )
  139. y = ( R + r ) * sin ( t ) - ( r + O ) * sin ( ( (R + r ) / r ) * t )
  140. '
  141. +
  142.     which is a harmonogram, by setting the decay constant to zero,
  143.     ~Ax1 = R + r~, etc, and adjusting the phase offsets to transform
  144.     sine to cosine and to switch + to -.
  145. -
  146. 3    Lissajous
  147. +
  148.     Lissajous is simply 
  149. -
  150. `
  151. x = sin ( n * t + c )
  152. y = cos ( t )
  153. '
  154. +
  155.     which again, can be derived from the harmonogram by suitable choice of
  156.     parameters.
  157. %
  158.     A Lissajous figure is a path traced out in the plane by a particle each
  159.     of whose coordinates are under simple harmonic motion.
  160.     Such trajectories are often encountered in physics. 
  161. %
  162.     Lissajous figures are sometimes called _Bowditch curves_ after 
  163.     _Nathaniel Bowditch_ who considered them in 1815.
  164.     They were studied in more detail (independently) by 
  165.     _Jules-Antoine Lissajous_ in 1857. 
  166. -
  167. 2    Harmonographs
  168. +
  169.     Typically found in science museums,
  170.     there are two basic forms:
  171.     one comprises a large, heavy, rectangular platform suspended at all
  172.     four corners by wires.  The platform can be swung and twisted, and
  173.     it can wobble forwards and backwards, side to side, and rotate a bit too.
  174.     The other basic form comprises two or more pendula (or pendulums...)
  175.     whose top ends extend a little bit above their axis, and are coupled
  176.     to a pen suspended resting on a piece of paper placed on the platform
  177.     of the Harmonograph.
  178. %
  179.     The platform or the pendula are set in motion by hand.
  180.     The oscillations decay,
  181.     with the resulting curves getting smaller and smaller,
  182.     spiralling in in a highly wobbly way.
  183.  
  184.     Weights are often located at various positions on
  185.     the table to produce different oscillatory patterns,
  186.     or the pendula lengths are adjusted.
  187. %
  188.     The harmonograph was pioneered by the French physicist,
  189.     _Jules Antoine Lissajous_ in 1857.
  190.     The first harmonograph actually used a light beam on a screen instead
  191.     of the pens on paper that are used today.
  192.     You can make your own by suspending a pencil flashlight from the ceiling
  193.     by a number (e.g. 3) of strings (connect the flashlight by a few feet
  194.     of string to the knot where you join the ceiling strings).
  195.     Place a camera under the flashlight, darken the room and open the
  196.     lens shutter for several seconds, and set the flashlight swinging
  197.     in an arc.
  198. %
  199.     Following the invention of the harmonograph it became a very popular
  200.     device and was found in many homes.
  201.     After the early 1900s it decreased in popularity and is rarely seen
  202.     today.
  203. -
  204. 3    References
  205. +
  206.     Cundy, H. and Rollett, A.    <br />
  207.     The Harmonograph    <br />
  208.     Mathematical Models, 3rd ed. Stradbroke,    <br />
  209.     England: Tarquin Pub., pp. 244-248, 1989.
  210. %
  211.     Wells, D.    <br />
  212.     The Penguin Dictionary of Curious and Interesting Geometry.    <br />
  213.     London: Penguin, pp. 92-93, 1991.
  214. -
  215.