This notebook contains additional material to the Mathematica GuideBooks  (Springer-Verlag, New York, 2004) http://www.MathematicaGuideBooks.org . It uses the stylesheet of the Mathematica GuideBooks, which is embedded.

Graphics Volume, Chapter 1

Take a discretized curve and draw circles through the midpoints of the lines connecting successive neighbors. Make an animation showing how the resulting collection of circles changes as the original curve morphs from one Lissajou figure to another.

frame[α_, φValues_, m_, f_:1] := 
With[{ℛ = {{ #1, #2}, {-#2, #1}}&[Cos[f α Pi/2], Sin[f α Pi/2]] // N,
      o = Length[φValues]},
Graphics[{Thickness[0.0001], (* color circles *)
MapIndexed[{Hue[α + 1.8 (#2[[1]] - 1)/m], #}&,
Reverse[Table[(* the circles *)
 Circle[ℛ.Plus[##]/2, Sqrt[#.#]&[(#1 - #2)]/2]&[#[[1]], #[[-1]]]& /@
  Table[Take[#, {i, i + n}], {i, o}]&[
         Join[#, Take[#, n]]], {n, 2, m}]&[
    (* linear interpolation between the two curves *)
    ((1 - α){Cos[5 #], Sin[3 #]} + α{Cos[3 #], Sin[5 #]})& /@ φValues]]]},
     PlotRange -> {{-1.5, 1.5}, {-1.7, 1.7}}, AspectRatio -> Automatic]]

Here are two animations. The left uses equidistant points on the curve, and the right uses 384 randomly selected points on the curve.

SeedRandom[123];
Module[{(* animation parameters *) frames = 6, circles = 17,
        φValues1 = 2Pi Range[256]/256.,
        φValues2 = 2Pi Sort[Table[Random[], {384}]]},
Do[Show[GraphicsArray[
        {frame[k/frames, φValues1, circles], 
         frame[k/frames, φValues2, circles, -1]}]],
   {k, frames}]];

SeedRandom[123];
Module[{(* animation parameters *) frames = 60, circles = 17,
        φValues1 = 2Pi Range[256]/256.,
        φValues2 = 2Pi Sort[Table[Random[], {384}]]},
Do[Show[GraphicsArray[
        {frame[k/frames, φValues1, circles], 
         frame[k/frames, φValues2, circles, -1]}]],
   {k, frames}]];