Skip to content

A stochastic method to generate an approximation to the Sierpinski triangle

Notifications You must be signed in to change notification settings

ajnirp/stochastic_sierpinski

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

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.

About

A stochastic method to generate an approximation to the Sierpinski triangle

Topics

Resources

Stars

Watchers

Forks