Function Repository Resource:

CrossNodeGridGraph

Contributed by: Utkarsh Patel and Simon Fischer
 ResourceFunction["CrossNodeGridGraph"][r,d] creates a d-dimensional grid graph with r cross-linked vertices in all dimensions. ResourceFunction["CrossNodeGridGraph"][{n1,n2,…,nd}] creates a d-dimensional grid graph with ni cross-linked vertices in each dimension.

Details and Options

ResourceFunction["CrossNodeGridGraph"] can be used to create fractional dimension hypergraphs.
ResourceFunction["CrossNodeGridGraph"] has the same options as Graph, with the following additions and changes:
 "CoordinateLabeled" True whether to change vertex labels to a Cartesian coordinate system with the central vertex as origin VertexLabels Automatic labels and placements for vertices VertexSize Tiny size of vertices
With the setting , the vertices are laid out in an orthogonal grid for dimensions 2 and 3.

Examples

Basic Examples (2)

 In[1]:=
 Out[1]=

 In[2]:=
 Out[2]=

Scope (2)

A 5-dimensional cross-linked grid graph, embedded in 3D:

 In[3]:=
 Out[3]=

A 2-dimensional rectangular cross-linked grid graph:

 In[4]:=
 Out[4]=

Options (2)

CoordinateLabeled (2)

With "CoordinateLabeled"->False, the vertex labels are set as their indices:

 In[5]:=
 Out[5]=

With "CoordinateLabeled"->True, the vertex labels are set as their Cartesian coordinates:

 In[6]:=
 Out[6]=

A 3-dimensional cross-linked grid graph with vertices labeled as their Cartesian coordinates:

 In[7]:=
 Out[7]=

Properties and Relations (3)

CrossNodeGridGraph[r,d] is equivalent to CrossNodeGridGraph[ConstantArray[r,d]]:

 In[8]:=
 Out[8]=

The tetrahedral graph is a special case of CrossNodeGridGraph:

 In[9]:=
 Out[9]=

CompleteGraph is a special case of CrossNodeGridGraph:

 In[10]:=
 Out[10]=

Neat Examples (2)

Visualize a perspective projection of a 4D cross-linked grid graph:

 In[11]:=
 Out[12]=

Create a 2D cross-linked grid graph:

 In[13]:=
 Out[13]=

The resource function WolframHausdorffDimension can be used to verify that the dimensionality of the graph's vertices are of fractional order:

 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

Utkarsh Patel

Version History

• 1.0.0 – 25 July 2022