Visualizations Using p5py/p5
pip install p5
- Brownian Tree Snowflake
python snowflake/snowflake.py
python fractal-toothpick-sequence/fractal.py
Rules of the game:
Given n seed points [x1, x2, x3.....xn] and 1 random starting point C.
- Randomly choose one of the seed points (uniform probability) say
x
k
: - Create a new point at the middle of
C
andx
k
- Call the new point
C
and Repeat from 1.
python chaos-game/chaos.py
After Several Iterations
- Each frame of the gif represents 100 iterations of the game.
- Color of point
C
corresponds to the target seed points which was selected for generatingC
.
With 3 seed points (equilateral Triangle) | 4 seed points (square) |
---|---|
We get the Serpinski Triangle 😲 | No Fractal Pattern |