/draw_p5

Visualizations Using p5py/p5

Primary LanguagePython

Visualizations Using p5py/p5

Install p5

pip install p5

  • Brownian Tree Snowflake

python snowflake/snowflake.py

python fractal-toothpick-sequence/fractal.py

A Video by Numberphile

Rules of the game:

Given n seed points [x1, x2, x3.....xn] and 1 random starting point C.

  1. Randomly choose one of the seed points (uniform probability) say xk:
  2. Create a new point at the middle of C and xk
  3. 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 generating C.
With 3 seed points (equilateral Triangle) 4 seed points (square)
We get the Serpinski Triangle 😲 No Fractal Pattern