This week we’re learning Cellular Automata and Fractals

Process

From the examples in the textbook, I wanted to make a grid of smaller cellular automata instead of a large one.

So I used nested for loops to initialize a grid and populated them with CAs having randomised binary ruleset. floor(random(2)) ensured I got either a 0 or a 1.

  generateRuleSet() {
    let rules = new Array(9);
    for (let i = 0; i < rules.length; i++) {
      rules[i] = floor(random(2));
    }
    return rules;
  }

Within the main grid is a cellular automaton, and each cellular automaton had it’s own grid of pixels.

What I did additionally was to introduce alpha values to my colors, so that the changing automata don’t seem too painful on the eyes, and it’s instead more of a transition. This did mean to move away from pure black and white and into grey territory.

grid1.gif

grid2.png

random(2) was giving a lot of dark and flickering values, so I tried random(6) to weigh it more towards filling my canvas.

random(2) was giving a lot of dark and flickering values, so I tried random(6) to weigh it more towards filling my canvas.

The patterns looked like those of rugs. So I looked into some of the history behind rugs in India, and found some interesting references.

This one on the MET’s website gave a good overview on Mughal era carpets and rugs

https://www.metmuseum.org/met-publications/flowers-underfoot-indian-carpets-of-the-mughal-era

In the late 19th century these carpets, replicating original Mughal designs, were woven by prison laborers in centers like Agra and Amritsar, and were called ‘jail carpets’ - https://rugandkilim.com/blogs/the-antique-carpet-weaving-traditions-of-indian-jails/?srsltid=AfmBOoqkpbQLki7UVjcGF6PgAaFVw2XTs688ptMolXzWgnuZfRbHYUwE

This practice was adopted by the British who began to import the carpets; they were used to decorate palaces, guest houses, hotels, government offices and bungalows. It was encouraged by colonial officials and prison authorities who needed productive and profitable (even lucrative) inmate “activities”. By this time, and into the end of the 20th century, most of India’s vast carpet production was monopolized by English companies.

The jail carpet weaving industry remained operational even after India’s independence from British rule. According to the 1961 census report, the Jaipur Central Jail had employed thirty-five prisoners to make carpets.

https://nazmiyalantiquerugs.com/blog/history-of-inmates-weaving-indian-jail-rugs/

https://mapacademy.io/article/jail-carpet-weaving/

https://nazmiyalantiquerugs.com/blog/history-of-inmates-weaving-indian-jail-rugs/

https://nazmiyalantiquerugs.com/blog/history-of-inmates-weaving-indian-jail-rugs/

https://nazmiyalantiquerugs.com/blog/history-of-inmates-weaving-indian-jail-rugs/

https://nazmiyalantiquerugs.com/blog/history-of-inmates-weaving-indian-jail-rugs/

So now I repurposed my code to show only one overall grid block, changing the aspect ratio to suit that of a carpet. Then I increased the resolution within the automata itself and started to go through random variations in the ruleset. This gave me some interesting results -