fivemack (fivemack) wrote,
fivemack
fivemack

A square Apollonian fractal



Draw a square; in the centre of it, draw a circle. In the largest remaining area of the square, draw a circle. Carry on until you run out of pixels; in the posted image I ran out of pixels fairly early, in the thing I've linked to you'll find the first 128 layers but you'll be able to see the smaller ones only if you've got an SVG editing application. Be warned that rendering images this complex makes Firefox rather lethargic, and may require a plug-in on lesser browsers; don't worry, it hasn't crashed.

If you set up the problem in a computer-algebra package, you find that the centres and radii of the circles, which are defined by sets of three simultaneous quadratic equations and so you might expect to live in an ever-deepening hierarchy of extension fields, are in fact all defined over Q(√ 2); the denominators don't even get too hairy, the largest in the first 128 layers is 257762.

If you don't have magma, you might want to see the log of the run; the layout of the log is obvious from the source code. I know the code's deeply inefficient, I'll need to improve that if I want to go more than a thousand iterations deep, but I don't know of languages which have both a decent Gröbner-basis library and reasonable handling of linked lists and priority queues. Writing priority queues in Magma is probably less painful than writing Gröbner-basis code in C++, but neither's very appealing at 1am, nor my first choice of entertainment at more reasonable hours.

If anyone's got the facility to print images onto large-poster-sized paper in a way in which millimetre-high letters are readable, I'd be interested to see what the highest-depth version I can generate looks like as a physical object; had I rather more energy than I think I do, I'd at least write a Java applet where you could zoom in and pan around ten thousand layers deep.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 17 comments