[math-fun] exact flowsnake spacefilling function
From gosper.org/flowsnakes.pdf (q.v. for pix): FlowS[t] gives the exact value for rational t. E.g.,
In[148]:= FlowS /@ {0, 1/7, 1/3, 1} Out[148]= {0, 5/14 - (I Sqrt[3])/14, 4/7 + (2 I Sqrt[3])/7, 1} It's a continuous function: In[149]:= FlowS /@ {7/22, 113/355} Out[149]= {1693/2762 + (543 I Sqrt[3])/2762, 13159704187...887406573947767669/ 21456243153017...26366300007824801961964892568 + (152317993023640247...951911649014 I)/ (268203039412723583...100245245611571 Sqrt[3])} In[150]:= N[%] Out[150]= {0.612962 + 0.340515 I, 0.613328 + 0.327889 I} As usual, it redefines itself twice and has no obvious termination condition: In[119]:= Clear[FlowS]; FlowS[t_, a_: 1, b_: 0] := FlowS[t, x_: 0, y_: 0] = (FlowS[t, s1_: 1, s0_: 0] = (b - s0)/(s1 - a); Module[{u = t*7, n}, u -= (n = Floor[u]); ComplexExpand[Switch[n, 0, w*FlowS[u, a*w, b], 1, w*(1 + (-1)^(1/3) + (-1)^(4/3)* FlowS[1 - u, a*(-1)^(4/3)*w, b + a*w*(1 + (-1)^(1/3))]), 2, w*((-1)^(1/3) + FlowS[1 - u, a*w, b + a*w*(-1)^(1/3)]), 3, w*((-1)^(1/3) + (-1)^(2/3)* FlowS[u, a*(-1)^(1/3)*w, b + a*w*(-1)^(1/3)]), 4, w*(Sqrt[-3] + FlowS[u, a*w, b + a*w*Sqrt[-3]]), 5, w*(2*(-1)^(1/3) + FlowS[u, a*w, b + a*w*2*(-1)^(1/3)]), 6, w*(2 + (-1)^(1/3) + ((-1)^(1/3) - 1)* FlowS[1 - u, a*w*((-1)^(1/3) - 1), b + a*w (2 + (-1)^(1/3))]), 7, 1]]]) Toward the end of the pdf are two plots that suggest there may be a typo in this definition. --rwg
Bill, what is the value of w? Wouter. -----Original Message----- From: Bill Gosper Sent: Saturday, September 28, 2013 10:53 AM To: math-fun@mailman.xmission.com Subject: [math-fun] exact flowsnake spacefilling function
From gosper.org/flowsnakes.pdf (q.v. for pix): FlowS[t] gives the exact value for rational t. E.g.,
In[148]:= FlowS /@ {0, 1/7, 1/3, 1} Out[148]= {0, 5/14 - (I Sqrt[3])/14, 4/7 + (2 I Sqrt[3])/7, 1} It's a continuous function: In[149]:= FlowS /@ {7/22, 113/355} Out[149]= {1693/2762 + (543 I Sqrt[3])/2762, 13159704187...887406573947767669/ 21456243153017...26366300007824801961964892568 + (152317993023640247...951911649014 I)/ (268203039412723583...100245245611571 Sqrt[3])} In[150]:= N[%] Out[150]= {0.612962 + 0.340515 I, 0.613328 + 0.327889 I} As usual, it redefines itself twice and has no obvious termination condition: In[119]:= Clear[FlowS]; FlowS[t_, a_: 1, b_: 0] := FlowS[t, x_: 0, y_: 0] = (FlowS[t, s1_: 1, s0_: 0] = (b - s0)/(s1 - a); Module[{u = t*7, n}, u -= (n = Floor[u]); ComplexExpand[Switch[n, 0, w*FlowS[u, a*w, b], 1, w*(1 + (-1)^(1/3) + (-1)^(4/3)* FlowS[1 - u, a*(-1)^(4/3)*w, b + a*w*(1 + (-1)^(1/3))]), 2, w*((-1)^(1/3) + FlowS[1 - u, a*w, b + a*w*(-1)^(1/3)]), 3, w*((-1)^(1/3) + (-1)^(2/3)* FlowS[u, a*(-1)^(1/3)*w, b + a*w*(-1)^(1/3)]), 4, w*(Sqrt[-3] + FlowS[u, a*w, b + a*w*Sqrt[-3]]), 5, w*(2*(-1)^(1/3) + FlowS[u, a*w, b + a*w*2*(-1)^(1/3)]), 6, w*(2 + (-1)^(1/3) + ((-1)^(1/3) - 1)* FlowS[1 - u, a*w*((-1)^(1/3) - 1), b + a*w (2 + (-1)^(1/3))]), 7, 1]]]) Toward the end of the pdf are two plots that suggest there may be a typo in this definition. --rwg _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
should be about (5 - I Sqrt[3])/14 , no? W. -----Original Message----- From: Wouter Meeussen Sent: Saturday, September 28, 2013 11:36 AM To: math-fun Subject: Re: [math-fun] exact flowsnake spacefilling function Bill, what is the value of w? Wouter. -----Original Message----- From: Bill Gosper Sent: Saturday, September 28, 2013 10:53 AM To: math-fun@mailman.xmission.com Subject: [math-fun] exact flowsnake spacefilling function
From gosper.org/flowsnakes.pdf (q.v. for pix): FlowS[t] gives the exact value for rational t. E.g.,
In[148]:= FlowS /@ {0, 1/7, 1/3, 1} Out[148]= {0, 5/14 - (I Sqrt[3])/14, 4/7 + (2 I Sqrt[3])/7, 1} It's a continuous function: In[149]:= FlowS /@ {7/22, 113/355} Out[149]= {1693/2762 + (543 I Sqrt[3])/2762, 13159704187...887406573947767669/ 21456243153017...26366300007824801961964892568 + (152317993023640247...951911649014 I)/ (268203039412723583...100245245611571 Sqrt[3])} In[150]:= N[%] Out[150]= {0.612962 + 0.340515 I, 0.613328 + 0.327889 I} As usual, it redefines itself twice and has no obvious termination condition: In[119]:= Clear[FlowS]; FlowS[t_, a_: 1, b_: 0] := FlowS[t, x_: 0, y_: 0] = (FlowS[t, s1_: 1, s0_: 0] = (b - s0)/(s1 - a); Module[{u = t*7, n}, u -= (n = Floor[u]); ComplexExpand[Switch[n, 0, w*FlowS[u, a*w, b], 1, w*(1 + (-1)^(1/3) + (-1)^(4/3)* FlowS[1 - u, a*(-1)^(4/3)*w, b + a*w*(1 + (-1)^(1/3))]), 2, w*((-1)^(1/3) + FlowS[1 - u, a*w, b + a*w*(-1)^(1/3)]), 3, w*((-1)^(1/3) + (-1)^(2/3)* FlowS[u, a*(-1)^(1/3)*w, b + a*w*(-1)^(1/3)]), 4, w*(Sqrt[-3] + FlowS[u, a*w, b + a*w*Sqrt[-3]]), 5, w*(2*(-1)^(1/3) + FlowS[u, a*w, b + a*w*2*(-1)^(1/3)]), 6, w*(2 + (-1)^(1/3) + ((-1)^(1/3) - 1)* FlowS[1 - u, a*w*((-1)^(1/3) - 1), b + a*w (2 + (-1)^(1/3))]), 7, 1]]]) Toward the end of the pdf are two plots that suggest there may be a typo in this definition. --rwg _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
From (corrected) gosper.org/flowsnakes.pdf (q.v. for (improved) pix): FlowS[t] gives the exact value for rational t. E.g.,
In[148]:= FlowS /@ {0, 1/7, 1/3, 1} Out[148]= {0, 5/14 - (I Sqrt[3])/14, 4/7 + (2 I Sqrt[3])/7, 1} It's a continuous function: In[168]:= FlowS /@ {7/22, 113/355} Out[168]= {1693/2762 + (543 I Sqrt[3])/2762, 2345845273398817840092950245183202891348356982612226750061526434654879728078331327658322166322544455096921202357/ 3824784042812146922648846082969066584366282400370622809380296235226226222138134929551565620475339497558916970979 + (2172173105963516197779522804535911788205830019423847609465739564008821336204362398272785130819862477878379140827 I)/(3824784042812146922648846082969066584366282400370622809380296235226226222138134929551565620475339497558916970979 Sqrt[3])} (*Fixing the typo considerably shortened these numbers.*) In[170]:= N[%168] Out[170]= {0.612962 + 0.340515 I, 0.613328 + 0.327889 I} As usual, it redefines itself twice and has no obvious termination condition: Clear[FlowS]; FlowS[t_, a_: 1, b_: 0] := FlowS[t, x_: 0, y_: 0] = (FlowS[t, s1_: 1, s0_: 0] = (b - s0)/(s1 - a); Module[{u = t*7, n}, u -= (n = Floor[u]); ComplexExpand[Switch[n, 0, w*FlowS[u, a*w, b], 1, w*(1 + (-1)^(1/3) + (-1)^(4/3)* FlowS[1 - u, a*(-1)^(4/3)*w, b + a*w*(1 + (-1)^(1/3))]), 2, w*((-1)^(1/3) + FlowS[1 - u, a*w, b + a*w*(-1)^(1/3)]), 3, (*Typo fixed*) w*((-1)^(1/3) + (-1)^(2/3)*FlowS[u, a*(-1)^(2/3)*w, b + a*w*(-1)^(1/3)]), 4, w*(Sqrt[-3] + FlowS[u, a*w, b + a*w*Sqrt[-3]]), 5, w*(2*(-1)^(1/3) + FlowS[u, a*w, b + a*w*2*(-1)^(1/3)]), 6, w*(2 + (-1)^(1/3) + ((-1)^(1/3) - 1)* FlowS[1 - u, a*w*((-1)^(1/3) - 1), b + a*w (2 + (-1)^(1/3))]), 7, 1]]]) --rwg My Firefox pdf viewer renders the first page blank and spods on the 2nd. Judging by Google Images, the name Flowsnake (which Mandelbrot detested) is losing out to "Gosper curve". Or maybe not--a lot of the "hits" are things like glider guns and Foxtrot strips. ?
participants (2)
-
Bill Gosper -
Wouter Meeussen