# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

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"][ returns a list of lists of polygons of mappings of the fundamental domain under up to | |

ResourceFunction["ModularTessellation"][ returns a list of lists of associations of the property | |

ResourceFunction["ModularTessellation"][ returns the property |

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 .

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.

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:

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]= |

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]= |

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]= |

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/*y*^{2}) 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]= |

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]= |

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]= |

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]= |

Extract the circles of order 12 and locally add their radii:

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]= |

- 1.0.0 – 13 November 2019

This work is licensed under a Creative Commons Attribution 4.0 International License