Sierpinski Triangle Fractal

Mon, Mar 3, 2003 One-minute read

The Sierpinski Triangle is a neat mathematical diagram of triangles within triangles. I wanted to implement one in C#, and it only takes about 50 lines of custom code (not including the template code that Visual Studio generates for you.) The recursion code only takes up ~ 10 lines!

For more information about Sierpinski Triangles, Wikipedia is of course a great resource.

Download