Complete Affine Structures on the 2-Torus

W. Goldman, 29 October 2003

First define the quadratic diffeomorphism of the plan with parameter epsilon.

QuadDiffeo[
        epsilon_, {s_, t_}] :=   {s   +  
 
          epsilon t^2/2, t}

Now compute the image of the grid. Slopes1 and Slopes2 form the basis of the lattice. Range1 and Range2 are the ranges defining the grid and
must be of the form Range[ min, max, increment]. If increment is omitted, it is assumed to equal 1.

Parabolas[u_, epsilon_, Slopes1_, Slopes2_, Range1_, 
        Range2_]   :=   Join[
        Map[QuadDiffeo[epsilon, {#, 0}   +   u Slopes1] &, Range1], 
        Map[QuadDiffeo[epsilon, {0, #}   +   u Slopes2] &, 
          Range2] ]

The following function draws the picture on the screen and saves it (in .eps format) to a file named name.eps. Note that name must be enclosed
in quotes. The parameter u for the individual parabolas ranges over the interval [-10,10]. The viewbox is the square [-5,5] x [-5,5].

DrawPicture[name_, epsilon_, Slopes1_, Slopes2_, Range1_, Range2_] := 
        Display[StringJoin[name, ".eps"], 
          ParametricPlot[
            Evaluate[
              Parabolas[u, epsilon, Slopes1, Slopes2, Range1, 
                Range2], {u, -10, 10. }], Axes -> None, 
            PlotRange -> {{-5, 5}, {-5, 5}}, Frame -> True, 
            FrameTicks -> None], "EPS"];

DrawPicture["picture000", 0.0, {0, 1}, {1, 0}, 
        Range[-20, 20], Range[-20, 20]];

DrawPicture["picturem00", -0.3, {0, 1}, {1, 0}, 
        Range[-20, 20], Range[-20, 20]];

DrawPicture["picturep00", 0.3, {0, 1}, {1, 0}, 
        Range[-20, 20], Range[-20, 20]];

DrawPicture["picture0m1", 0.0, {-1, 1}, {1, 1}, 
        Range[-20, 20], Range[-20, 20]];

DrawPicture["picturemm1", -0.3, {-1, 1}, {1, 1}, 
        Range[-20, 20], Range[-20, 20]];

DrawPicture["picturepm1", 0.3, {-1, 1}, {1, 1}, 
        Range[-20, 20], Range[-20, 20]];