Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 596 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 596 Bytes

Sierpiński-Triangle-Generator

Uses a chaos game to generate a Sierpiński triangle. The method is as follows:

  1. Start by drawing 3 points to form the vertices of an equilateral triangle.
  2. Draw a point in the center of the triangle (or anywhere).
  3. Randomly select one of the three vertices.
  4. Draw another point halfway between the center point (the one that is not one of the triangle's vertices) and the selected vertex.
  5. Repeat steps 3 and 4, but with the newly drawn point and another randomly selected vertex.
  6. With sufficient iterations, a recognizable pattern should emerge.