|
cKleinhuis
|
|
« Reply #1 on: September 20, 2011, 04:06:23 PM » |
|
ehrm ... does this belong to our adult section !?
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
KRAFTWERK
|
|
« Reply #2 on: September 20, 2011, 04:38:51 PM » |
|
Must be a bug!
|
|
|
Logged
|
|
|
|
Pauldelbrot
|
|
« Reply #3 on: September 20, 2011, 07:29:05 PM » |
|
I notice you have branch cuts in the spirals inside some of the buds (particularly the period-3 buds) inside the M-set. I can get rid of those. Use this algorithm: - Iterate an interior, or suspected-interior, point w while keeping a saved earlier iteration t, initially equal to the starting point (for the normal quadratic M-set, this is the critical point 0). After every iteration compare the current iterate w with the saved one q. If they are extremely close, closer than some very small distance o, the point is periodic. At iterations 1, 2, 4, 8, 16, etc. update the saved iteration q to the current one w (after the comparison, of course). That's Brent's periodicity detection algorithm.
- If the point escapes, do whatever. If it doesn't, but Brent doesn't fire, color it black.
- Save the iterate w as t -- a point on the attractor. Iterate t forward until it's close to w again, counting these iterations, and save this count as p, the period of the attractor. Iterate t forward some more until the total number of iterations is congruent to zero mod p. Now t is very close to the specific attractor point that's in the same attracting basin component as the critical point we're studying.
- Reiterate w from the starting point and check its distance from t whenever the iteration count i is congruent to zero mod p. Stop when w gets within a small disk (but much larger than o) around t. Save w, and save the iteration number i.
- Iterate from w forward p iterations and save this point as y. Iterate from y forward p iterations and save this point as z. It should now be the case that w, y, and z are three successive iterates to land within the primary basin component, and that t is very close to the attractor point in the same component, in particular, very much closer than w is.
- Compute a = (arg (t - y) - arg (t - w))/2π. This is the internal angle of the starting point.
- Compute b = |t - w|, c = |t - y|, and d = |t - z| -- the distances of x, y, and z from the attractor.
- Compute the ratio r = (b - c)/(a - b). This is the acceleration towards the attractor.
- Compute log (((a - r)/(1 - r))(1/r - 1) + 1)/log(1/r). This is the fractional smoothed iteration.
- Add i to that to get the smoothed iteration j.
- The best spirals seem to result from setting colorindex = a + sf(j), where s determines the steepness of the spiral and f is a function. (It's assumed that colorindex 0 maps to one end of the gradient, 1 to the other, a gradient that starts and ends on the same color is chosen, and colorindex values out of the range [0,1] are taken as their fractional parts only.)
- s = 10 and f(x) = 1/(px) (where p is the period from before) gives very similar results to this image, except that there is exactly one full repetition of the gradient around a circle in each bud or cardioid. In particular, if you used a green gradient that repeats four times you'd get a main cardioid very much like in this image, but there'd be four spiral arms in every bud, not two in the front bud and 4/3 in the side buds (which non-integral value may be the source of your branch cuts).
- Note that all of the above can be done for any map of the complex plane, not just the traditional quadratic Mandelbrot.
|
|
|
Logged
|
|
|
|
Vega
Global Moderator
Conqueror
Posts: 143
From Russia With Love
|
|
« Reply #4 on: September 24, 2011, 06:58:57 PM » |
|
I use other method. It is similar to yours. My method is intended for a 2D texture. Is your method intended for a 1D texture?
|
|
|
|
Pauldelbrot
|
|
« Reply #5 on: September 24, 2011, 08:41:33 PM » |
|
For that, you want the internal angle of the point within the component. You seem to be currently getting the internal angle times the period, for whatever reason. My method for getting internal angles is to let an iterate get extremely close to a previous iterate, thus finding a point P of the attractor; then make a target disk, large in comparison to "extremely close", about this point and look at the first two iterates X, Y that lie inside that disk. The angle XPY is then a good approximation to the internal angle through the start point of the iteration, and can be computed as arg (X - P) - arg (Y - P) where arg is your complex number argument-determining function (likely based ultimately on atan, or atan2 if your programming language has that function) and subtraction of points is (equivalently) vector subtraction and complex number subtraction.
Note also that the number of iterations between X and Y gives the component's period.
The accuracy improves the smaller the target disk is compared to the component's size, and thus in general the pixel size, and also the smaller the "extremely close" distance is compared to the target disk size.
|
|
|
Logged
|
|
|
|
Vega
Global Moderator
Conqueror
Posts: 143
From Russia With Love
|
|
« Reply #6 on: September 28, 2011, 08:19:17 AM » |
|
For that, you want the internal angle of the point within the component. You seem to be currently getting the internal angle times the period, for whatever reason. My method for getting internal angles is to let an iterate get extremely close to a previous iterate, thus finding a point P of the attractor; then make a target disk, large in comparison to "extremely close", about this point and look at the first two iterates X, Y that lie inside that disk. The angle XPY is then a good approximation to the internal angle through the start point of the iteration, and can be computed as arg (X - P) - arg (Y - P) where arg is your complex number argument-determining function (likely based ultimately on atan, or atan2 if your programming language has that function) and subtraction of points is (equivalently) vector subtraction and complex number subtraction.
Note also that the number of iterations between X and Y gives the component's period.
The accuracy improves the smaller the target disk is compared to the component's size, and thus in general the pixel size, and also the smaller the "extremely close" distance is compared to the target disk size.
I wait for a fraclal which you will draw by your technique.
|
|
|
|
|
Pauldelbrot
|
|
« Reply #8 on: December 14, 2011, 09:47:23 AM » |
|
Here's another variation on the theme, this time mapping the radial coordinate such that the images don't crowd toward the border of the M-set. It's very much like the one with the maple leaves or the one with the stars in terms of how the images are mapped ... save that the buds don't have fractional images, and indeed all rings of images in this rendering, in all buds and cardioids, have seven repetitions.
|
|
|
Logged
|
|
|
|
Vega
Global Moderator
Conqueror
Posts: 143
From Russia With Love
|
|
« Reply #9 on: December 14, 2011, 11:41:33 AM » |
|
Pauldelbrot Wow! Congratulate!
|
|
|
|
Pauldelbrot
|
|
« Reply #10 on: December 14, 2011, 08:39:28 PM » |
|
Thanks!
|
|
|
Logged
|
|
|
|
Alef
|
|
« Reply #11 on: December 18, 2011, 06:00:33 PM » |
|
Nice ladybirds. Could there be smaller images made of the large final images
|
|
|
Logged
|
fractal catalisator
|
|
|
|