Function Repository Resource:

# ModularTessellation

Compute polygons, circles, compositions and transformation functions for the tessellation of the upper half-plane by the modular group

Contributed by: Michael Trott
 ResourceFunction["ModularTessellation"][order] returns a list of lists of polygons of mappings of the fundamental domain under up to order repeated applications of the generators of the modular group. ResourceFunction["ModularTessellation"][order, prop] returns a list of lists of associations of the property prop of the fundamental domain under up to order repeated applications of the generators of the modular group. ResourceFunction["ModularTessellation"][function, prop] returns the property prop of the fundamental domain under the modular transformation function.

## Details and Options

Modular transformations are univariate fractional linear transformations generated by compositions of and . Alternatively a map f is a modular transformation if it can be written as with .
The modular transformations of successive orders arise from applying the generators to the maps of a given order.
The curvilinear triangles arising from applying all modular transformations to the fundamental domain tessellates the upper half-plane . The fundamental domain is the set of complex numbers .
order can be either a nonnegative integer or a list of one or two nondecreasing nonnegative integers.
For most properties the output is a list of associations with one association per order. The keys of the associations are the modular transforms represented as pure functions.
function must be a modular function represented as a pure function (head Function).
The following properties prop are supported:
 "BoundingCircles" circles/lines bounding the curvilinear triangles "BooleanRegions" Boolean region descriptions of the curvilinear triangles "ImplicitRegions" implicit region descriptions of the curvilinear triangles "ApproximationPolygons" polygons of the curvilinear triangles "Compositions" representations of the modular transformations as compositions of generators {"UnitDiskMappedApproximationPolygons",{β,θ}} curvilinear triangles mapped to the unit disk through
ResourceFunction["ModularTessellation"] has the following options:
 "PlotPoints" 20 number of points of the approximate polygons "IncludeVerticalStripes" True if the vertical stripes that extend to ⅈ ∞ should be included in polygon lists "VerticalStripeTruncation" Infinity maximal vertical extension of the vertical stripes

## Examples

### Basic Examples (6)

Plot the first few iterations of applying the generators of the modular group with alternating black and white colors:

 In[1]:=
 Out[1]=

The polygons of the first two orders of the tessellations:

 In[2]:=
 Out[2]=

The bounding circles of the first orders:

 In[3]:=
 Out[3]=

Show the fundamental domain and the boundary circles of the first order modular transformations:

 In[4]:=
 Out[4]=

The mapped fundamental polygons of the upper half-plane conformally mapped into the unit disk:

 In[5]:=
 Out[5]=

The polygons of the first eight orders of mapping the fundamental domain:

 In[6]:=
 Out[6]=

### Scope (9)

Use the keys of the association to add tooltip labels to the mapped fundamental domain polygons:

 In[7]:=
 In[8]:=

Explicit exact form of the circles and lines bounding the curvilinear triangles of order 3:

 In[9]:=
 Out[9]=

Plot the bounding circles of curvilinear triangles:

 In[10]:=
 In[11]:=
 Out[11]=

The bounding circles of the first few orders of curvilinear triangle (the blue circles are overlaid over the polygons):

 In[12]:=
 Out[12]=

The curvilinear triangles and vertical stripes as Boolean regions:

 In[13]:=
 Out[13]=

Discretize one of the regions:

 In[14]:=
 Out[14]=

The curvilinear triangles and vertical stripes as implicit regions:

 In[15]:=
 Out[15]=

Discretize one of the regions:

 In[16]:=
 Out[16]=

Compute the area of one of these regions exactly:

 In[17]:=
 Out[17]=

Compute the perimeter of the map of the fundamental domain under :

 In[18]:=
 Out[18]=
 In[19]:=
 Out[19]=

The modular transformations of the first few orders:

 In[20]:=
 Out[34]=

Show curvilinear triangles from a range of orders (here from 6 to 12):

 In[35]:=
 Out[35]=

### Options (4)

By default, the translations of the fundamental domains extending to are included:

 In[36]:=
 Out[36]=

Do not include the vertical stripe polygons:

 In[37]:=
 Out[37]=

Include the vertical stripe polygons, but cut them at :

 In[38]:=
 Out[38]=

Vary the number of points along the boundary segments of the fundamental domain and its mappings:

 In[39]:=
 Out[39]=

### Applications (7)

Calculate the areas of the curvilinear triangles of order 5 (the vertical stripes generated by have infinite area):

 In[40]:=
 Out[40]=

Compute the eigenvalues of the Laplacian (with appropriate metric factor 1/y2) for the map of the fundamental domain under the modular transformation :

The region the eigenvalue problem is to be solved in:

 In[41]:=
 Out[41]=
 In[42]:=
 Out[42]=
 In[43]:=

Plot the values of the first 50 eigenvalues:

 In[44]:=
 Out[44]=

Plot the eigenfunctions of the first six eigenfunctions:

 In[45]:=
 Out[45]=

A contour plot of a higher eigenstate:

 In[46]:=
 Out[46]=

Compare the shape of the curvilinear triangles. To compare triangles of different size, rescale all triangles to have the same horizontal extension:

 In[47]:=
 In[48]:=
 Out[48]=

Show all triangles of the order 16:

 In[49]:=
 Out[49]=
 In[50]:=
 Out[50]=

The radii distribution of the circles of the first 18 orders:

 In[51]:=
 Out[51]=

Plot the sum of the radii of the first 16 orders of circles:

 In[52]:=
 In[53]:=
 Out[53]=

Add the local heights of the order 10 circles:

 In[54]:=
 In[55]:=
 Out[55]=

The size of the triangles varies substantially within a given order. Plot a histogram of all finite order 16 triangles:

 In[56]:=
 Out[56]=
 In[57]:=
 Out[57]=

Plot a histogram of the distribution of the perimeter-to-area values for the order 14 triangles:

 In[58]:=
 In[59]:=
 Out[59]=

### Properties and Relations (7)

The Klein invariant takes on every complex value within each of the mapped fundamental domains. Plot the Klein invariant over one of the triangles:

 In[60]:=
 In[61]:=
 Out[61]=

The Klein invariant obeys J(z)=J(f(z)) for any modular transform f. Check this for the first three orders to 50 digits:

 In[62]:=
 Out[62]=

Use the Fourier series of the Klein invariant to visualize the mapping from a fundamental triangle to the complex plane:

 In[63]:=
 Out[63]=
 In[64]:=
 In[65]:=
 Out[65]=

Use an arctan transformation to map the infinite plane into a finite square:

 In[66]:=
 In[67]:=
 Out[67]=

A given modular transform can be represented in multiple ways. Here are all possibilities with up to three generator applications (for easier readability we abbreviate the pure functions of the generators):

 In[68]:=
 Out[138]=

Show the network of modular transforms by connecting transforms that arise from applying a generator:

 In[139]:=
 In[140]:=
 Out[140]=

Plot the circle radii for the first 16 orders on a logarithmic scale (each order adds two circles of radius 1 and near the origin more and more small circles are generated):

 In[141]:=
 Out[141]=

Place the circles in 3D with smaller circles placed in front of larger ones:

 In[142]:=
 In[143]:=
 Out[143]=

Plot Ford circles (arising from the Farey sequence) together with the circles from the modular tessellation:

 In[144]:=
 In[145]:=
 Out[145]=

### Possible Issues (3)

The number of modular transformations increases quickly with the order. This means graphics of order ≃20 will take longer to compute and render:

 In[146]:=
 Out[146]=

The polygons are approximate; this means making their boundaries near the x-axis visible by using logarithmic scaling shows numerical artifacts:

 In[147]:=
 Out[147]=

Boolean regions, implicit regions and bounding circles are only supported for the upper half-plane, not for the unit circle–mapped triangles:

 In[148]:=
 Out[148]=
 In[149]:=
 Out[149]=

### Neat Examples (7)

A symmetrized version of the modular tessellation:

 In[150]:=
 Out[150]=

Color each order of triangles differently:

 In[151]:=
 Out[151]=

Convert each triangle into a 3D plot with the height depending on the distance to the polygon boundary:

 In[152]:=
 In[153]:=
 Out[153]=

Conformally map the triangles of the unit disk into a triangle:

 In[154]:=
 In[155]:=
 Out[155]=

Interactively change the parameters of the most general map from the upper half-plane to the unit disk:

 In[156]:=
 Out[156]=

Map an interactively movable point from the fundamental domain into other triangles and connect nearest points by lines:

 In[157]:=
 In[158]:=
 In[159]:=
 Out[159]=

 In[160]:=
 In[161]:=
 Out[161]=

Associate a frequency proportional to the circle's curvatures and play the resulting sound:

 In[162]:=
 In[163]:=
 Out[163]=

## Version History

• 1.0.0 – 13 November 2019