Rug Maker
rug
creates an image of a square weave rug colored using tricoloration or p-coloration rules from knot theory.
To install:
go install git.sr.ht/~satchlj/rug
To run:
rug <fringeFunction> <num>
Where fringeFunction
is the function which determines the fringe of the rug and thus the entire coloration, and num
is an integer which determines the size of the rug.
Currently the only options for fringeFunction
are alternate
and random
.
You can also generate a difference diagram between two fringe functions using rug diff
:
rug diff <fringeFunction1> <fringeFunction2> <num>
You can generate a rug or difference diagram which is p-colored instead of 3-colored by calling
rug <fringeFunction> <num> <p>
rug diff <fringeFunction1> <fringeFunction2> <num> <p>
rug
will save a file to the working directory called <fringeFunction><num>.png
. Colors are RGB.
Idea from Bary Cipral and Paul Zorn at the Bridges 2023 Conference Proceedings; see original paper here.
See example images generated by rug
.