Skip to content

Bradwave/chaosgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chaos Game

A minimalist, interactive web application for exploring the Chaos Game—a mathematical method for generating fractals using polygons and simple rules.

Overview

The Chaos Game is a process of generating the attractor of an Iterated Function System (IFS). By repeatedly jumping halfway (or another fraction) towards a randomly chosen vertex of a polygon, complex and beautiful fractal patterns like the Sierpinski Triangle emerge.

This application provides a clean interface to experiment with the parameters that govern these patterns.

Features

  • Customizable Geometry: Choose the number of vertices for your polygon.
  • Rule Configuration:
    • Chaos Factor: Adjust the distance fraction for each jump (e.g., 0.5 for halfway).
    • Constraints: Set rules to prevent jumping to specific vertices based on previous moves (e.g., "cannot jump to the same vertex twice").
  • Visual Controls:
    • Adjust point size and drawing speed.
    • Set the number of iterations to control density.
  • Minimalist UI: A distraction-free dark mode interface with a collapsible settings panel.

How it Works

  1. Start: A point is chosen inside the polygon.
  2. Iterate: A vertex of the polygon is chosen at random.
  3. Move: The next point is placed at a fraction (the Chaos Factor) of the distance between the current point and the chosen vertex.
  4. Repeat: This process is repeated thousands of times to reveal the fractal structure.

Note

This project was mostly vibe coded.

About

A chaos game application.

Topics

Resources

Stars

Watchers

Forks

Contributors