OFFSET
1,1
COMMENTS
LINKS
Brady Haran and Don Knuth, Wrong turn on the Dragon, Numberphile video (2014)
Wikipedia, Dragon curve
EXAMPLE
For definiteness, we choose the Dragon in the complex plane with Dragon(0) = 0, Dragon(1) = 1, Dragon(1/3) = 1/5+2i/5
(I^2:=-1) Then using A(3) = 47, for k=2,3,4, {dragun[47/60], dragun[47/120],dragun[47/240]}
-> {{2/3 + I/6}, {1/4 + (5 I)/12}, {-(1/12) + I/3}}
These have inverse images undrag/@First/@%
{{37/60, 13/20, 47/60}, {37/120, 13/40, 47/120}, {37/240, 13/80, 47/240}}
dragun[47/15/2^k] = dragun[39/15/2^k] = dragun[37/15/2^k], which empirically = (5/3 - I) (1 + I)^k 2^(-1 - k)
so every eighth point is 5/6-I/2 over a power of 16.
MATHEMATICA
(* by Julian Ziegler Hunts *)
piecewiserecursivefractal[x_, f_, which_, iters_, fns_] := piecewiserecursivefractal[x, g_, which, iters, fns] = ((piecewiserecursivefractal[x, h_, which, iters, fns] := Block[{y}, y /. Solve[f[y] == h[y], y]]); Union @@ ((fns[[#]] /@ piecewiserecursivefractal[iters[[#]][x], Composition[f, fns[[#]]], which, iters, fns]) & /@ which[x]));
dragun[t_] := piecewiserecursivefractal[t, Identity, Piecewise[{{{1}, 0 <= # <= 1/2}, {{2}, 1/2 <= # <= 1}}, {}] &, {2*# &, 2*(1 - #) &}, {(1 + I)*#/2 &, (I - 1)*#/2 + 1 &}]
undrag[z_] := piecewiserecursivefractal[z, Identity, If[-(1/3) <= Re[#] <= 7/6 && -(1/3) <= Im[#] <= 2/3, {1, 2}, {}] &, {#*(1 - I) &, (1 - #)*(1 + I) &}, {#/2 &, 1 - #/2 &}]
DeleteDuplicates[Reap[Do[If[Length[#] > 2, Sow[15*64*#[[3]]]] &@
undrag[dragun[k/15/64][[1]]], {k, 0, 288*3}]][[2, 1]]]
(* or 128 or 256 or ... *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Bill Gosper, Jul 30 2015
STATUS
approved