Draw a Recursive Triangle

preview_player
Показать описание
This short describes an algorithm for drawing a Sierpinski triangle using recursion and squares.

The benefit of using this algorithm instead of more intuitively inscribing triangles in each other is that it is much more programmatically simple to decide where to draw squares than it is to decide where to inscribe triangles.

Another cool detail about this algorithm is that it NEVER draws large triangles - the large triangles exist implicitly as a result of drawing a bunch of small triangles.
Рекомендации по теме
Комментарии
Автор

Thanks for watching! Here's the code base:

redblacktech