So, Filling...

Continuing with this... (busy week at work! whew!)

Instead of filling with boring old rectangles, what about filling with ellipses?

First problem: it's just too much work to do the dividing and conquering with actual ellipses. There's no good way to recursively chop a rectangular image into successively smaller ellipses. So, I decided to just stick with the rectangles right up until the point where I go to fill them in. Then, I'll just draw an ellipse that covers what the rectangle covers. This is just an experiment. I can do what I want.

So, given that we need each ellipse to cover, at least, the same area as the rectangle would have, is there a way to determine the optimal ellipse? That is: given a rectangle, how big is its proportional enclosing ellipse? Beats me. Sounds like tough problem. But, StackExchange knew:

A=RectWidth / √2
B=RectHeight / √2

So much simpler than I'd expected.

So, here we go. Everything else is the same, except that I'm drawing ellipses instead of rectangles.

ml_sz2_t100_ell

Hmm... Interesting. Looks like a lot of eggs. I don't like that the tops and lefts of the ellipses are all visible, but the bottoms and rights aren't. That's a consequence of the fact that the overall drawing and processing basically goes left to right, top to bottom.

Can I change the order in which they're drawn? Yes.

Instead of drawing ellipses as soon as they're calculated, I put them in a list. At the end I have a list of all the ellipses that would've been drawn. Then, sort that list by the area of each ellipse. And then, draw the sorted ellipses - biggest first. That way, the smaller ellipses will overlay the bigger ones. And that gives:

ml_sz2_t100_ellSt

Better. There's variety in which parts of the ellipses are obscured. And, the ends of the really big ellipses along the left and right sides are covered up.

With borders? Sure!

ml_sz2_t100_ellStO

No fill, borders only?

ml_sz2_t100_ellStNo

Sweeeeeeet.