https://github.com/apidcloud/chaos-game
Chaos Game to visualise Sierpinski triangle using Plotly
https://github.com/apidcloud/chaos-game
Last synced: 5 months ago
JSON representation
Chaos Game to visualise Sierpinski triangle using Plotly
- Host: GitHub
- URL: https://github.com/apidcloud/chaos-game
- Owner: Apidcloud
- License: mit
- Created: 2021-04-01T23:35:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-04T19:07:07.000Z (about 5 years ago)
- Last Synced: 2025-02-01T16:48:44.692Z (over 1 year ago)
- Language: HTML
- Size: 7.94 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chaos Game



This project generates different fractals with the Chaos Game, through the use of Plotly. For instance, Sierpinski triangle, can be generated by starting with 3 vertices (V1, V2, V3), and a (pseudo-)random starting point within the boundaries of the triangle made with said vertices. In each iteration, a vertex is chosen (pseudo-)randomly. A new point (n) is then created and directed to the chosen vertex and placed at half the distance between the chosen vertex and the last added point (n-1). After a few hundred iterations, the silhouette of the Sierpinsky triangle starts to appear. With some more rules and different distances, other fractals are achieved (see examples below).
[Live Demo](https://apidcloud.github.io/chaos-game/)
