I captured an ancient Fibonacci Monster

  • Thread starter Thread starter DeyuanGuo
  • Start date Start date
DeyuanGuo
Messages
7
Reaction score
0
Hello guys. I'm a newcomer here, and I'm from Beijing, China.
This rare creature, named Fibonacci Monster, was born from the Big Bang.
I happened to capture it by running the following Python code. I like it.

Fibonacci_Monster.gif


Code:
from turtle import *
j, k = 1, 1
while True:
    i = j + k
    j, k = i, j
    forward(20)
    right(i % 360)

Another creature, named Fibonacci Deer, was found together.
Just by changing the first two number to 1, 5:

Fibonacci_Deer.gif


Code:
from turtle import *
j, k = 1, 5
while True:
    i = j + k
    j, k = i, j
    forward(20)
    right(i % 360)

Can anybody give me a mathematic interpretation? Thanks!
--Deyuan
 
Last edited:
Mathematics news on Phys.org
Curious3141 said:

haha, I don't think Pareidolia is a mathmatic interpretation, it's just one of the abilities of mathematician..
 
This reminds me of singular value decomposition. It's a pretty common phenomena related to efficiency in the transmission of digital image pixels (satellite, fax, internet, etc.) and our ability to interpret them where blurry images become sharper and vice versa. By keeping all the "boring" parts out of the transmission close approximations can be found by reducing singular values and corresponding vector values, which, in turn, represents substantial savings in comprehensible data transmission! For example,

A = σ_1u^T_1+...+ σ_r u_r v^T_r

Let k≤r and define

A_k=σ_1u_1v^T_1+...+σ_ku_kv^T_k

A_k is an approximation to A that corresponds to keeping only the fist _k singular values and the corresponding singular vectors in an nXn pixelated image within some arbitrary \mathbb{R}^n.
 
phion said:

Well, thank you! That seems interesting, and I think I need more time to learn about the SVD.

In my opinion, I can describe this procedure like this:
Start from the origin of Cartesian coordinate system:
x(0) = 0
y(0) = 0
Then go to next point by forward L length and θ angle:
x(n) = x(n-1) + L*cosθ
y(n) = y(n-1) - L*sinθ
here θ = F(n) / 180 * PI
F(n) is the Nth number of Fibonacci sequence.

I don't know why it becomes an closed curve and why it looks like this..
 
DeyuanGuo said:
haha, I don't think Pareidolia is a mathmatic interpretation, it's just one of the abilities of mathematician..

What he's saying is that the figures don't mean anything. It's a mess of polygons that vaguely resemble something with legs; what kind of mathematical explanation do you expect there to be?
 
Number Nine said:
What he's saying is that the figures don't mean anything. It's a mess of polygons that vaguely resemble something with legs; what kind of mathematical explanation do you expect there to be?

Thanks, I see. Though I called them monster or deer, they are just a kind of imagination.
Perhaps the explanation is like this:

Why:
Ʃ(sin(F(i)/180*PI)) = 0
Ʃ(cos(F(i)/180*PI)) = 0
i = 0 to 119
F(i) is the ith number in Fibonacci sequence.

I'm not able to prove these equations, I just happened to find these facts...
 
DeyuanGuo said:
I don't know why it becomes a closed curve
Now that is the interesting part of the question no one has tackled so far.

It amounts to saying that\sum_{i=1}^M \langle r, (s_i \mbox{ mod } 360) \rangle = {\bf 0}for some integer M, where <r,a> is notation for a two dimensional vector in polar coordinates (a vector with magnitude "r", the 20 in the Python programs, and direction "a" degrees), and s_i is some integer sequence, Fibonacci or otherwise.

Notice that a (non-zero) constant sequence will satisfy the statement above, drawing regular polygons: for example, the constant sequence {90,90,90,90,...} will draw a square, and the sequence {1,1,1,1,...} will draw the 360-sided regular polygon.

Similarly, consider a periodic sequence with period P; that is, a sequence where the numbers repeat every P numbers. Take, for example, the sequence {11,22,33,11,22,33,...} where the numbers 11,22,33 repeat indefinitely. Let the vector <R,A> (again in polar form: a vector with magnitude R and direction A, with A in degrees for our purposes) be the sum of the P vectors with angles taken from the period: the sum of <20,11>, <20,22>, <20,33> in this example. In the long run, the drawing with the periodic sequence will go to the same place as the drawing of the constant sequence {A,A,A,A,...}, using a vector magnitude of r=R (instead of 20) in the statement above. Thus, a closed curve (as long as the angle sum A is non-zero modulo 360).

In summary, the figure will be closed if the Fibonacci sequence (or the other one) modulo 360 is periodic (as long as the period adds up to a non-zero number). The fact that these Fibonacci-like recurrence sequences are periodic modulo some number is not hard to prove; see the first few lines near the beginning of
http://www.math.temple.edu/~renault/fibonacci/fib.html
specifically, paragraph A.2. The part of the sum of the period being non-zero was just luck; for example, starting with 0,180 (instead of 1,1 or 1,5) would have not produced a closed curve.
 
Last edited by a moderator:
  • #10
P.S.:
There are a few loose ends in my argument above.
  • The sequence will eventually be periodic modulo 360... but it could have had a non-periodic startup before becoming periodic. For example, the sequence {1,2,3,4,5,4,5,4,5,4,5,...} begins with 1,2,3 and THEN enters the endless period 4,5. This means that the drawing could have had some curve wandering about, and THEN draw a closed curve from that point on. The fact that it draws a closed curve from the beginning is still unexplained. (But I have to go to work now!)
  • Each periodic repetition draws some curve, which may look like a "petal" of a flower; when repeated, the succession of "petals" will end up drawing a closed curve, the whole "flower". (This is a summary of what I tried to say in my previous post.) The resulting curve should have looked like one of these old "spirograph" drawings,
    http://www.thefirstfew.com/2010/04/spirograph-retro-toy/
    In other words, the result could have easily been one monster... then another monster at an angle, then another, and another... giving a succession of monsters eating each other's tail, until completing a closed "polygon" where each side is a monster, instead of just a straight line. But we got exactly just one monster, not a succession of monsters following each other. This is still unexplained.

And by the way, DeyuanGuo... a very funny subject it is, congratulations. :)
 
  • #11
Dodo said:
And by the way, DeyuanGuo... a very funny subject it is, congratulations. :)

Thank you very much for your professional explanation.
I found these patterns are interesting. For example, if it starts from (j=1, k=7), then it will not be a closed curve.
I think there are a lot of things I can learn from you. Could you please contact with me through my email: guodeyuan at gmail dot com?
 
  • #12
I think the monsters are influenced by integer overflow, Try to see what happens if you use i = (j+k) % 360 to keep i and j small.
 
  • #13
willem2 said:
I think the monsters are influenced by integer overflow, Try to see what happens if you use i = (j+k) % 360 to keep i and j small.

Thanks, but I'm sure that the integers i, j, k do not overflow.
The Python language supports the long integer type, and it can only overflow after the computer memory exhausted.
 
Last edited:
  • #14
Interesting. I implemented it in Mathcad (using modulo arithmetic) and it seems as though initializing to (j k) results in a different patterns all of period of 120 except for the following (easily predicted) values, which move linearly ...

j - k ...
1 - 2 7 12 17
2 - 4 9 14 19
3 - 6 11 16 21
4 - 8 13 18 23
5 - 10 15 20 25

(that is, start with j then choose a value from the various k values in that row, eg(j k) = (2 9) or (2 14))
 
  • #15
Another thing to look at is dividing the circle into n parts (rather than just 360 (degrees)) ... not all such n result in spatially cyclic sequences.
 
  • #16
NemoReally said:
Interesting. I implemented it in Mathcad (using modulo arithmetic) and it seems as though initializing to (j k) results in a different patterns all of period of 120 except for the following (easily predicted) values, which move linearly ...

j - k ...
1 - 2 7 12 17
2 - 4 9 14 19
3 - 6 11 16 21
4 - 8 13 18 23
5 - 10 15 20 25

(that is, start with j then choose a value from the various k values in that row, eg(j k) = (2 9) or (2 14))

Thanks for your reply. With the i = j + k and modulo 360 rule, all the 360*360 possibilities of initializing (j, k), from (0, 0) to (359, 359), has only 360 different patterns(I guess), and 4/5 of them are closed curves, while 1/5 of them are non-closed curves.

These non-closed curves, or the linearly-moving pairs as you say, appear evenly and periodically in the 2-D plane:

Code:
j\k	0 1 2 3 4 5 6 7 8 9 10 ...
0	N         N         N
1	    N         N
2	        N         N
3	  N         N
4	      N         N
5	N         N
6	    N         N
...
I think investigating the different rules, such as i = j + 2k or modulo 180, etc., is a compicated but interesting work.
 
Back
Top