A sixth of a turn is usually associated with the equilateral triangle, whose internal angle it is, at each corner. Use half the length of an edge of such a triangle as unit, so each edge has length 2. Drop a perpendicular, P, from one vertex, T, onto the opposite edge, hitting its centre, C, one unit from each of its ends; from the resulting right-angle triangle, on either side of P, with hypotenuse 2 and an edge of length 1, we can infer that P has length √(2×2 −1×1) = √3; this is then (by specification, given the construction just described) tan(turn/6).

Discard one half of the triangle and bisect the turn/6 angle, at corner V, in the right-angle half that we've kept of the original equilateral triangle; the angle bisector hits P part way up, at point R between C and T, forming a new right-angle triangle, RCV, now with turn/12 at V; as the right angle (at C) is turn/4 and the sum of its three angles is turn/2, its angle at R is turn.(1/2 −1/4 −1/12) = (6 −3 −1).turn/12 = 2.turn/12 = turn/6, making RCV similar to VCT. Thus CV is √3 times RC; as TC (i.e. P's length) is √3 times CV, we have 3.CR = CT, so R is exactly a third of the way from C to T.

If we now half-turn the outer triangle, VCT, about the centre of its hypotenuse and connect R to its image, we get a rectangle with its diagonal criss-crossed by a ray that bisects the angle between diagonal and a short edge, at each end, while reflecting in each long edge along the way, cutting the rectangle into two equilateral triangles and two halves of another. If we then juxtapose copies of this, reflected in each of its long edges, we get the same pattern on its side and enlarged (with the line-colours interchanged), amidst some embelishments:

Of course, we can now repeat this, reflecting in *its* long edges, to
get a scaled-up copy of the first rectangle:

Naturally, we can scale this down and substitute the result and its mirror image in place of each copy of the original rectangle and its; repeating that indefinitely should get us a fractal pattern – albeit the scaled down lines get invisibly thin quite quickly (so I only repeated the substitution twice; and you have to scale up a lot to notice the second):

One complication to depicting this is that √3 is irrational and my
images are in SVG where (since I always type only finitely many digits of each
co-ordinate) all ratios among edges are rational; so I need a decent rational
approximation to √3. The way I usually obtain one of those
uses continued
fractions (specifically, `continued.rationalize()`; when that
fails, `ratio.Rational.approach()`,
which uses `continued.real_continued()`). Inconveniently, √3's
continued fraction representation is poorly-behaved:

- √3 = 2 −1/(4 −1/(4 −1/(4 −…)))

since (2 −√3).(2 +√3) = 4 −3 = 1, so x = 2
−√3 gives 1/x = 2 +√3 = 4 −x, whence x = 1/(4 −x)
= 1/(4 −1/(4 −1/(4 −x))) and √3 = 2 −x.
Truncating such a continued fraction (whose successive denominators are all
equal; in this case 4) at steadily later steps in the …

tends to
produce only slowly-converging approximations (with rapidly-growing numerators).
Indeed, we get (listing each rational with its error, in mantissa-exponent
notation):

- 2 (2.68e-1), 7/4 (1.79e-2), 26/15 (1.28e-3), 97/56 (9.20e-5), 362/209 (6.61e-6), 1351/780 (4.74e-7), 5042/2911 (3.41e-8), 18817/10864 (2.45e-9), …

with (numerator and) denominator growing (unsurprisingly) by roughly a factor of four, and the error only reducing by slightly better than a factor of ten, at each step. I settled on 362/209; it looks good enough – twenty parts in three million will do for graphics.

Valid CSS ? Valid XHTML ? Written by Eddy.