Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 509 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 509 Bytes

About

A stochastic method to generate an approximation to the Sierpinski triangle. Made using p5.js.

Demo

Imgur link

Algorithm

  1. Pick a random point p inside the triangle (algorithm).
  2. Draw it.
  3. Pick a random vertex of the triangle and find its midpoint with p. Set p to that midpoint.
  4. Go to step 2.

Why it works

Not sure. Need to figure this one out.