Graphtacular

early codeC# · 2019

A C# console app I wrote in 2019, before AI tools were around. A graph grows itself from one seed vertex by following a shared list of instructions, like a genome.

History: kept as the 2019 original. Its strand idea now lives on in split_load_sim, which swaps the string-matched instructions for typed, checked ones and uses the graphs to test the Genius Study's assumptions.

How it grows

// StrandLib.cs: the Flower strand
 1  {"KcompleteCluster", 8, 1}
 2  {"KbranchUndirected", 1, 1}
..  // 3 to 6: the same branch
 7  {"KcompleteCluster", 8, 1}
..  // the pattern twice more
19  {null}

KcompleteCluster with 8 adds eight children that are all joined to each other. KbranchUndirected with 1 adds one child on an edge. null ends the strand.

Renders

Graphs are exported as GEXF files and rendered in Gephi.

A Gephi render on white: a dense central cluster with eight arms, each ending in smaller clusters of pale green vertices
Fibonacci
A Gephi render on white: a small central cluster with four long branches, each ending in a cluster that branches again
Flower fractal

The Graph class

It stores the graph as an adjacency matrix. Besides growing graphs, the Graph class measures them:

Green-on-black console output from 2019: a 9-by-9 adjacency matrix with a GUID and kernel for each vertex, then each vertex's neighbor list
Console output from 2019: the adjacency matrix and neighbor lists for a nine-vertex graph.

Build

Links

Repo: neuresthetics/graphtacular Successor: split_load_sim

← Back to home