dorkhub

t-fractal

A small web app to create fractals by layering a simple seed pattern at different scales.

xcontcom
JavaScript772 forksMITupdated 6 months ago
git clone https://github.com/xcontcom/t-fractal.gitxcontcom/t-fractal

T-fractal

Preview

A small web app to create fractals by layering a simple seed pattern at different scales.


How It Works

You start with a small pattern called a seed - like a 4×4 grid of 0s and 1s.

This seed is repeated to fill the entire 2D matrix.

Then we make the seed bigger (twice as big), and fill the matrix again - but instead of clearing it, we accumulate the new values with the existing ones.

We keep doing this: make the seed bigger, fill again, and accumulate again.

In the end, each cell in the matrix contains a number showing how many times it was hit with a 1.

Then we color the result - using grayscale, rainbow, or CGA palettes - based on the final number in each cell.


Demo

Demo 3D


License

MIT License. See LICENSE for details.


Author

Serhii Herasymov

sergeygerasimofff@gmail.com

https://github.com/xcontcom


more like this

fernery

A CLI tool for generating images of ferns 🌿 and other Iterated Function Systems

Haskell51

search

search projects, people, and tags