Skip to content

Sierpiński triangle using Python

Notifications You must be signed in to change notification settings

malte-berg/sierpinski

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Sierpiński triangle using Python

This simple project was done to learn more about using the Turtle graphics class in Python. When running, the turtle places dots in different colors and forms the fractal known as the Sierpiński triangle.

Made with chaos

Taken from the Sierpiński triangle Wikipedia article

  1. Take three points in a plane to form a triangle.
  2. Randomly select any point inside the triangle and consider that your current position.
  3. Randomly select any one of the three vertex points.
  4. Move half the distance from your current position to the selected vertex.
  5. Plot the current position.
  6. Repeat from step 3.

Releases

No releases published

Packages

No packages published

Languages