Skip to content

triposorbust/fractal-graph

Repository files navigation

Random Walk on a Triangular Lattice

Transition paths on a Sierpinski Gasket...

Introduction

Written with S.M. Ali Tabei for studies on random-walks. A quick program to:

  • Generate a triangular lattice graph
  • Layout the graph in Cartesian space
  • Execute a random walk on the graph

In principle, some of these components can be generalized to other kinds of lattices.

Quick Start

t2ahc $ make
t2ahc $ ./randomwalk [options]

Help

t2ahc $ ./randomwalk -h

Program for executing random walk on a lattice. Options:

-h		Prints the help menu to stdout and exits.
-s		Number of steps in random walk time series (dflt: 100)
-n		Number of time series to generate. (dflt: 4)
-o		Directory for writing output files. (dflt: "output")
-d		Recursion depth for lattice generation. (dflt: 3)

How you use it is up to you!

Plotting

Package by default outputs to the output subdirectory. This can be changed by using the -o option. The default output directory includes a matplotlib script for printing a .png of a given random walk.

To plot, simply:

t2ahc $ python plot.py <some-graph.output> <some-random-walk.output>

Or for more information:

t2ahc $ python plot.py -h

Authors

  • Andy Chiang (The University of Chicago)
  • S.M. Ali Tabei (The University of Chicago)

License

Copyright © 2013, Andy Chiang. All rights reserved.

This software is distributed under the MIT License.

About

A fractal lattice graph...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages