97

Maze Automata

A generative maze that builds itself in real-time.

60 FPS p5.js

p5.js Sketch Code

p.setup = () => {
  p.createCanvas(p.container.clientWidth, p.container.clientHeight);
  p.background(20);
  p.stroke(255);
};
let x = 0, y = 0, spacing = 20;
p.draw = () => {
  if (p.random(1) < 0.5) p.line(x, y, x + spacing, y + spacing);
  else p.line(x, y + spacing, x + spacing, y);
  x += spacing;
  if (x > p.width) { x = 0; y += spacing; }
  if (y > p.height) { p.background(20); x = 0; y = 0; }
};
p.windowResized = () => { if(p.container) p.resizeCanvas(p.container.clientWidth, p.container.clientHeight); };

Properties

#p5js#maze#automata
Author: Math Art Core Target: 60 FPS
ESC
↑↓ Navigate Select
101 Mathematical Artworks

Support the Project

Keep mathematical creative coding alive & open source

Or via Direct Payoneer ($0 Fee)
Payoneer Customer ID: $0 Fee Direct
24076084

💡 Payoneer app: Go to Pay → Pay to recipient → Enter ID 24076084.

Thank you for supporting generative mathematical animations! ✨