Sierpinsy Triangle
✓ Published0🌍 Public
This example renders a colorful Sierpinski triangle fractal using the HTML5 Canvas API. The visualization recursively draws the triangle to a depth of five, with each smaller triangle assigned a random bright hue via the `hsl()` color function. It uses basic Canvas drawing methods like `moveTo`, `lineTo`, and `fill`, and the display automatically resizes with the window.
AI-generated descriptionSierpinski Triangle
A fractal rendering of the Sierpinski triangle using HTML5 Canvas.
The triangle is drawn recursively with a depth of 5. Each smaller triangle is colored randomly with a bright hue.
The canvas resizes automatically when the window is resized.
MIT Licensed