Function Repository Resource:

SimpleCausalGraphCoordinates

Source Notebook

Generate Cartesian-like coordinates for a simple two-dimensional causal graph

Contributed by: Tom Lee, Jon Lederman

ResourceFunction["SimpleCausalGraphCoordinates"][size,type]

returns coordinates of the form {pointnumber,time,space} for the causal graph of structural type type.

Details

size represents the initial node size from which the resulting causal graph is built; the first column of the result will contain size coordinates.
Supported values for type are "Triangular", "Hexagonal" and "TriangularHexagonal". These describe the lattice on which the points lie in 1+1 dimensional spacetime.

Examples

Basic Examples (3) 

Coordinates for the simple triangular type causal graph with initial node size 10:

In[1]:=
triangular = ResourceFunction["SimpleCausalGraphCoordinates"][10, "Triangular"]
Out[1]=

Check that lie on a triangular lattice:

In[2]:=
ListPlot[triangular[[All, 2 ;; 3]]]
Out[2]=

Coordinates for the hexagonal type causal graph with initial node size 10:

In[3]:=
hexagonal = ResourceFunction["SimpleCausalGraphCoordinates"][10, "Hexagonal"]
Out[3]=

Check that these lie on a hexagonal lattice:

In[4]:=
ListPlot[hexagonal[[All, 2 ;; 3]], AspectRatio -> 1]
Out[4]=

Coordinates for the hybrid triangular-hexagonal type causal graph with initial node size 10:

In[5]:=
trihex = ResourceFunction["SimpleCausalGraphCoordinates"][10, "TriangularHexagonal"]
Out[5]=

Check that these lie on a hybrid lattice with triangles between hexagons:

In[6]:=
ListPlot[trihex[[All, 2 ;; 3]], AspectRatio -> 1]
Out[6]=

Scope (2) 

Create a triangular structured causal graph:

In[7]:=
Graph[ResourceFunction[
   "WolframModel"][{{x, y, y}, {y, z}} -> {{x, y}, {y, z, z}}, {{1, 2,
     2}, {2, 3}, {3, 4, 4}, {4, 5}, {5, 6, 6}, {6, 7}, {7, 8, 8}, {8, 9}, {9, 10, 10}, {10, 11}, {11, 12, 12}, {12, 13}, {13, 14, 14}, {14, 15}, {15, 16, 16}, {16, 17}, {17, 18, 18}, {18, 19}, {19, 20, 20}, {20, 21}, {21, 21, 1}}, Infinity, "LayeredCausalGraph"], GraphLayout -> "LayeredDigraphEmbedding", AspectRatio -> 1/2, VertexLabels -> Automatic]
Out[8]=

Calculate the coordinates for each node:

In[9]:=
ResourceFunction["SimpleCausalGraphCoordinates"][10, 1 "Triangular"]
Out[10]=

Publisher

Tom Lee

Version History

  • 3.0.0 – 11 June 2022
  • 2.0.0 – 14 March 2022
  • 1.0.0 – 04 October 2021

Source Metadata

Related Resources

License Information