531

🎒 531: Computation Aesthetics is a class taught by Charlie Roberts.

View the Project on GitHub luka-schulz/531

Turtles, Ants, Plats, and L-systems

Thursday, January 25, 2018

Examples

Langton’s ants emulate how ants and termites might move and travel

L-systmes

Aristid Lindenmayer, was interested in capture plany growth back in the ’50s

In formal language theory, a grammar, is a set of production rules for strings in a formal language

The Algorithmic Beauty of Plants

const rules = {
  A: "AB",
  B: "ABA"
};

const axiom = "A";
let output = axiom;
let numGenerations = 5;

for( let i = 0; i<5; i++ ) {
  let newOutput = "";
  
  for( let char of output ) {
    newOutput += rules[ char ];
  }
  output = newOutput;
};

Turtle

Seymour Papart believed that if you let kids play around with programming they could teach themselves calculus

in vs of

test = { a: 0 }
'a' in test //true
'b' in test // false

in used in a for look loops through and returns all the keys within an object

of loops through all values (just like a regular for loop)