You are viewing a single comment's thread. Return to all comments →
This was a lot of fun. The approach that worked for me in case it's helpful to anyone:
2D array of bits as the buffer. Recursive function taking a triangle description (coordinates of top point and height). The base case fills in the triangle described. Otherwise, recurse to the 3 corners - each has half the height, the top one is the same point and the others are translated down and left/right by half the height. Initial call then is the depth and the large triangle with top at the first row, middle column, and full height.
Thank you! Your comment helped me a lot.