This resource function is obsolete. Use the function TorusGraph instead.

Function Repository Resource:

# TorusGraph

Create a grid graph of any dimension with the topology of a torus

Contributed by: Stephen Wolfram
 ResourceFunction["TorusGraph"][{n1,n2,…,nk}] gives the k-dimensional toroidal grid graph with n1×n2×…×nk vertices.

## Details and Options

ResourceFunction["TorusGraph"][{n1,n2,,nk},DirectedEdgesTrue] gives a directed toroidal grid graph.
TorusGraph takes the same options as Graph.

## Examples

### Basic Examples (1)

Make a 10×5 toroidal grid graph:

 In[1]:=
 Out[1]=

### Scope (2)

Create a one-dimensional toroidal grid graph:

 In[2]:=
 Out[2]=

Create a three-dimensional toroidal grid graph:

 In[3]:=
 Out[3]=

Visualize the torus graph in 3D:

 In[4]:=
 Out[4]=

### Options (1)

#### DirectedEdges (1)

Use directed edges:

 In[5]:=
 Out[5]=
 In[6]:=
 Out[6]=

### Properties and Relations (2)

Compare a grid graph to a toroidal grid graph:

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

A grid structure becomes increasingly visible for larger toroidal grid graphs:

 In[9]:=
 Out[9]=

## Version History

• 2.0.0 – 18 March 2020
• 1.0.0 – 04 December 2019