Title: Period Detection for Dummies Post by: greentexas on June 09, 2017, 04:04:14 PM I am not very interested in period detection, but here is a quick and dirty way to carry it out. (Many of you know how this works, so I'm mostly writing to amateurs, but the experienced members may be able to learn too!)
Period detection can be used to figure out the structure of many escape-time fractals near a given point x. We also take another number n. Decreasing n decreases the chance of underestimating the length of the period and increases the chance of overestimating the length of the period. If we iterate -0.509 + 0.576i where n = 0.01, we end up with this result: At the end of the first iteration, we have -0.5817 - 0.0103i. At the end of the second iteration, we have -0.1707 + 0.588i. At the end of the third iteration, we have -0.8257 + 0.3752i. At the end of the fourth iteration, we have 0.03196 - 0.04356i. At the end of the fifth iteration, we have -0.50987663 + 0.57321582i. This is less than 0.01 units away from -0.509 + 0.576i, so the period is five. In fact, if we set n to a real number as low as 0.003 or as high as 0.338, we will still get a period of five. (If n is over roughly 0.338, the period will be said to be less than five; less than 0.003, and the period will be said to be greater than five.) If you use 0.0028 as the precision, the period will be ten, and not five. There are period 5 structures near -0.509 + 0.576i. Near other points, the structures have a period equal to the period of the other points. This could be useful if you want to determine the period of a shape in the Seahorse or Elephant Valley (since the periods are high). Simple iteration-bubble counting can also help you find the period, as it is a lot easier without programming. Title: Re: Period Detection for Dummies Post by: claude on June 09, 2017, 05:24:14 PM I think your numbering of iterations is a little off: usually it is: z_0 = 0 ; z_1 = c ; ... A different way is to check that z_p is near zero, rather than z_{p+1} is near c. They have the same effect in the end, but it's a little easier to calculate. Then (what I call) "partials" are the iterations p where |z_p| is smaller than all previous |z_n|. They are good candidates for possible periods. I wrote a small program to calculate them, here's some output, lines with **** are the partials: Code: $ ./partials -0.509 0.576 and here's the program: Code: // gcc -std=c99 -Wall -Wextra -pedantic -O3 -o partials partials.c -lm The last partial (if it exists, and it usually does) is called the atom period, and plotting that using different colours in an image gives you connected atom domains, see: http://www.mrob.com/pub/muency/atomdomain.html |