This site is supported by donations to The OEIS Foundation.

Template:Self-avoiding walk

From OeisWiki
Jump to: navigation, search

The {{self-avoiding walk}} graphic template is used to draw a self-avoiding walk on a rectangular lattice graph.

Issues

Only the default colors show up, not the custom colors?!

Usage

{{Self-avoiding walk
| ''grid rows count''
| ''grid columns count''
| ''up to 16 by 16 rectangular lattice edges'' (''not walked-on'' or ''walked-on'') as Boolean values (0 or 1)
| on_color  = ''walked-on edges color'' (default: blue)
| off_color = ''not walked-on edges color'' (default: rgb(240,240,240))
| row_sep   = ''rows separator'' (default: ,,)
| H_sep     = ''H edges separator'' (default: *)
| V_sep     = ''V edges separator'' (default: .)
}}

Valid input

The cell corners of an 
(m  −  1)  ×  (n  −  1)
square grid are the nodes with coordinates from 
(0, 0)
to 
(m  −  1, n  −  1)
of the corresponding 
m  ×  n
square lattice.
  • First argument: grid rows count (lattice rows count − 1)
  • Second argument: grid columns count (lattice columns count − 1)

For other arguments, see examples.

Note: no row separator is allowed after the last row, otherwise it won't properly handle the last row!

Examples

See the /doc subpage. (Can't transclude the examples, otherwise 'Template include size is too large.')