Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/constantiner/sierpinski-triangle-react
Sierpiński triangle implementation with React/TypeScript
https://github.com/constantiner/sierpinski-triangle-react
canvas canvas2d react reactjs recursion-exercises sierpinski-triangle typescript
Last synced: 26 days ago
JSON representation
Sierpiński triangle implementation with React/TypeScript
- Host: GitHub
- URL: https://github.com/constantiner/sierpinski-triangle-react
- Owner: Constantiner
- License: mit
- Created: 2023-07-30T13:24:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-02T17:11:32.000Z (8 months ago)
- Last Synced: 2024-05-03T03:58:37.984Z (8 months ago)
- Topics: canvas, canvas2d, react, reactjs, recursion-exercises, sierpinski-triangle, typescript
- Language: TypeScript
- Homepage: https://constantiner.github.io/sierpinski-triangle-react/
- Size: 646 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sierpinski-triangle-react
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
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](https://constantiner.github.io/sierpinski-triangle-react/).
Thanks [this article](https://medium.com/@pdx.lucasm/canvas-with-react-js-32e133c05258) for the inspiration.