Skip to content

CharlesNaylor/reversible_ca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Celtic Knots based on Cellular Automata

In A New Kind of Science, Stephen Wolfram demonstrates reversible one-dimensional cellular automata. Using these, you can create a chaotic pattern that resolves into a regular geometric shape, before dissolving again forever more into chaos.

I have a weirdly narrow hallway in my house that needs a custom-sized rug to prevent my toddlers getting splinters. You can use this code to create a long, narrow pattern that looks a bit like a Persian rug in the center, and chaos at either end. This is how my two-year-old learned the words 'order' and 'chaos'.

To make things more interesting, the basic binary pattern can be translated into XML nodes and edges and fed into Knotter, provided you're willing to take the risk of downloading something from SourceForge.

I can't provide my images as the file sizes are too large. However, in this repo:

  • ca.py implements Wolfram's reversible cellular automata with the regular pattern specified in a numpy matrix.
  • draw_svg.py will repeat an SVG pattern based on the boolean matrix output from ca.py.
  • draw_celtic.py will output an XML file of nodes and edges which is suitable for uploading into Knotter, to turn the binary dots into celtic knots.

About

Turn a reversible one-d cellular automata pattern into Celtic knots

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors