Constantiner / sierpinski-triangle-react

Sierpiński triangle implementation with React/TypeScript

Home Page:https://constantiner.github.io/sierpinski-triangle-react/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sierpinski-triangle-react

Stand With Ukraine

This project is a recursive implementation of the Sierpiński triangle using React, Canvas, and TypeScript. The Sierpiński triangle is a fractal named after Polish mathematician Wacław Sierpiński. The triangle is formed by recursively dividing an equilateral triangle into smaller equilateral triangles and removing the central triangle. The resulting pattern is a beautiful and intricate fractal. In this project, we use React to render the Sierpiński triangle on a Canvas element and TypeScript for strict typing. The recursive implementation allows for creating Sierpiński triangles of varying sizes and levels of detail.

The demo is available here.

Thanks this article for the inspiration.

About

Sierpiński triangle implementation with React/TypeScript

https://constantiner.github.io/sierpinski-triangle-react/

License:MIT License


Languages

Language:TypeScript 67.0%Language:JavaScript 21.8%Language:HTML 5.5%Language:SCSS 3.4%Language:CSS 2.0%Language:Shell 0.3%