Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. December 01, 2025, 09:59:58 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Period detecting  (Read 2547 times)
0 Members and 1 Guest are viewing this topic.
gaston3d
Guest
« on: December 27, 2009, 10:17:56 PM »

hi,
i would like to implement coloring function based on orbit period.
anyone know simple period detecting method in complex/quaternion series?
Logged
lkmitch
Fractal Lover
**
Posts: 238



« Reply #1 on: December 28, 2009, 12:15:19 AM »

hi,
i would like to implement coloring function based on orbit period.
anyone know simple period detecting method in complex/quaternion series?


The simplest of which I'm aware is this:  iterate a bunch of times and save that final z value and its iteration number.  Then, for each subsequent iteration, compare that z with the stored value.  If the difference (typically, magnitude of z - zstored) is less than a threshold value, then the difference in iteration values is the (assumed) period.  Should work for any variable type.
Logged
BradC
Safarist
******
Posts: 85



« Reply #2 on: December 28, 2009, 01:19:01 AM »

Also see http://www.mrob.com/pub/muency/period.html.

One way to detect when a cycle has occurred is to iterate two variables at once, with one iterating half as fast as the other. If they ever become equal, then a cycle has occurred. The difference of their iteration counts when this happens will be a multiple of the period.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #3 on: December 28, 2009, 02:14:32 PM »

Also see http://www.mrob.com/pub/muency/period.html.

One way to detect when a cycle has occurred is to iterate two variables at once, with one iterating half as fast as the other. If they ever become equal, then a cycle has occurred. The difference of their iteration counts when this happens will be a multiple of the period.

If you store the z[n] values in an array you do not need to iterate twice, you just need 2 index counters smiley
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
aluminumstudios
Conqueror
*******
Posts: 135


« Reply #4 on: April 08, 2010, 07:55:14 AM »

If you store the z[n] values in an array you do not need to iterate twice, you just need 2 index counters smiley

I know this is an old topic, so this may be irrelevant, but with my recent work on a buddhabrot renderer, I wonder if it might not actually be faster to to iterate twice rather than storing the Z values because a memory access between each iteration might really hold the CPU up resulting in a lot of wasted cycles since CPU arithmetic is SO much faster than memory accesses.

Just a though, I don't know if it's true or not.
Logged
reesej2
Guest
« Reply #5 on: April 08, 2010, 08:32:58 AM »

I don't know... I'd think it'd depend on the system you're using. Unless you're using a language with either really amazing support for complex numbers or really lousy memory procedures, I think storing it in an array would be faster. The only exception I can think of is if you're doing a tremendous number of iterations, so big that the array has to be put on the hard drive instead of the cache. THEN it'd be faster to just iterate twice.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #6 on: April 08, 2010, 12:59:19 PM »

For a very simple fractal like z^2+c then iterating twice may be more efficient but on a modern CPU I don't think you need to get much more complicated to get to a point where storing the values would be more efficient (simply due to improvements in memory access generally). Certainly if the calculations involved a divide or any transcendentals then storing would be faster.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
makc
Strange Attractor
***
Posts: 272



« Reply #7 on: April 08, 2010, 09:11:28 PM »

maybe it would be better to use orbit radius, then you only need last 3 z's.
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #8 on: April 11, 2010, 05:29:33 AM »

...why do you say that, makc?

What about period 5?

...or is this some kind of thing with radius of curvature??!?!!
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
makc
Strange Attractor
***
Posts: 272



« Reply #9 on: April 11, 2010, 03:41:23 PM »

his original intent was to color the thing using orbit period,and for that he seemingly needed to store lots of z-s. so I said the he could go with radius instead as the radius can be calculated from only 3 points. I am not saying using radius instead of period would make better picture or anything
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.207 seconds with 27 queries. (Pretty URLs adds 0.012s, 2q)