Fibonacci word/fractal: Difference between revisions

Content added Content deleted
Line 348: Line 348:
Instead, I'll just describe the algorithm:
Instead, I'll just describe the algorithm:


This draws a discrete parametric curve. Right turn is 0j_1, left turn is 0j1 (negative and positive square roots of negative 1), straight ahead is 1. So: build a list of alternating 0j_1 and 0j1 and raise them to the first power for the 0s in the fibonacci word list and raise them to the 0th power for the 1s in that list. Then compute the running product, shift a 0 onto the front of the list and compute the running sum. (Of course, this would translate to a rather simple loop, also, once you see the pattern.)
This draws a discrete parametric curve. Right turn is 0j_1, left turn is 0j1 (negative and positive square roots of negative 1), straight ahead is 1. So: build a list of alternating 0j_1 and 0j1 and raise them to the first power for the 0s in the fibonacci word list and raise them to the 0th power for the 1s in that list. Then compute the running product, shift a 0 onto the front of the list of products and compute the running sum. (Of course, this would translate to a rather simple loop, also, once you see the pattern.)


=={{header|Logo}}==
=={{header|Logo}}==