|
matsoljare
|
 |
« on: January 17, 2010, 05:42:59 PM » |
|
We can see the formula for squaring complex numbers as a form of visual distorsion of the two-dimensional plane, rather than a mathematical formula. So, by including the process of addition and iteration which results in the Mandelbrot and Julia sets, we can create a similar system of iteration based on any two-dimensional spatial distorsion. Have anyone ever tried making Mandelbrot and Julia sets out of, for example, the infamous "swirl" and "pinch" effects found in many image editors?  
|
|
|
|
|
Logged
|
|
|
|
|
kram1032
|
 |
« Reply #1 on: January 17, 2010, 08:11:44 PM » |
|
hmm... an interesting idea  however, those are quite destructive, I guess....
|
|
|
|
|
Logged
|
|
|
|
|
Timeroot
|
 |
« Reply #2 on: January 17, 2010, 08:26:34 PM » |
|
Yes, but since squaring in the complex plane isn't injective, the "distortion" to describe it wouldn't be very similar to either of those. I'm not sure that these two transformations will produce anything very interesting, because they are injective, and the possess rotational symmetry. Something with a shift (such as (x,y)->(x,y+1), then (x,y)->T(x,y), and then (x,y)->(x,y-1) back again) to disrupt this symmetry would produce interesting results. For reference, the Swirl transform (in the Flam3 code) is T(x, y) = (x sin(r2) − y cos(r2), x cos(r2) + y sin(r2)), and the Fisheye transform (or rather the Eyefish transform), which is very similar to your "pinch" effect, is defined by T(x, y) = (2/r + 1) · (x, y).
If you create the Julia sets for these transforms, that's just the regular Flame-a type of IFS; that's already in a lot of programs. Mandelbrot set would be interesting though. I wonder if enr.ucl could easily be modified in order to enable a mandelbrot type. I'll try making some of these soon. Can't wait to see them!
|
|
|
|
|
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.
|
|
|
|
Timeroot
|
 |
« Reply #3 on: January 17, 2010, 11:59:12 PM » |
|
Hmm, I stand corrected. It does have rotational symmetry, but only two fold - it does produce a fractal after all. The eyefish formula doesn't seem to produce anything of interest, even with several different alterations applied. The shift idea - moving it, applying the transform, then moving back - turns out to be totally moot; One the second iteration, after moving, it would be as if it hadn't been readjusted afterwards at all. In the end, it really just moves the image. Adding it and not removing it afterwards does produce a change in the image, though. The swirl Mandelbrot bears strong similarities to the Henon map - not the actual set, but the iteration coloring - and it forms very mysterious bands sometimes. Sometimes the inside "overlaps" the bands of noisy, high iterations, and produce interesting visual effects. Finally, it seems the bailout needs to be very high - at least 200 - in order to produce a mathematically correct image (In fact, it seems the true set may be the entire plane - the set grows without bound with the bailout, even if the iterations increase). On the other hand, values of 4/8/10 or so produce more aesthetic images. Changing the offset (without removal afterwards) gives some interesting "warps" to it, while perturbing the inital value produces an effect reminiscent of James Bond: A circular windows moves about, showing you the "entire" fractal. I'll keep playing around with the eyefish for now, but I think it really may not do anything interesting because (a) it has full rotational symmetry and (b) it keeps the direction the same while monotonically increasing distance. Maybe squaring it before/after the transformation? Idk...
|
|
|
|
|
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.
|
|
|
|
Timeroot
|
 |
« Reply #4 on: January 18, 2010, 12:11:50 AM » |
|
Oh wow, do I ever fail.. I just realized I had an error in formula, it actually is rotationally symmetric. Although the (highly irregular) conecentric circles/bands of iterations are interesting, no prizes for this image. Perturbation and repeatedly added Offset to produce more interesting shapes though... I guess this is just another example where errors are more interesting than the mathematically correct. I'll post some pics soon.
|
|
|
|
|
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.
|
|
|
|
kram1032
|
 |
« Reply #5 on: January 18, 2010, 12:51:29 AM » |
|
already curious about the images  Tried something in Gimp but probably due to my extreme lack of knowledge lead to produce nothing 
|
|
|
|
|
Logged
|
|
|
|
|
Timeroot
|
 |
« Reply #6 on: January 18, 2010, 04:57:04 AM » |
|
(Sorry it took so long, weird attachment size limits) - Okay, I had a really long post explaining it all, but in the hassle of getting the files up I lost it all  The first picture is of the MSet for the Swirl transform. The second is with a perturbation and offset. The the third is a zoom of the second, showing the folding-type structure going on, some hyperbolas, and wonderful NOISE. In the fourth, there is a different offset which shows one of the weirdest phenomena exhibited: the black area replaces most of the high iteration areas, while the low iteration blue bands are ignored and cover the black. The fifth and sixth show the error version - I'd made a mistake and the compiler had completely ignored the y-component. The sixth is with a perturb/offset, the fifth without. The bailout values for these images should be a lot higher if they were going to be mathematically correct, but I stuck with 16 for the first 4 images and 8 for the last two; these produce the most aesthetic results. At lower bailouts, it gets clipped, and at higher, it get's noisy and ugly. Hehe, it actually did end up being as long as my original  Oh, and the pictures are at http://sites.google.com/site/timerootalex/SwirlPics1.zip and http://sites.google.com/site/timerootalex/SwirlPics2.zip.
|
|
|
|
|
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.
|
|
|
|
Timeroot
|
 |
« Reply #7 on: January 18, 2010, 07:31:35 AM » |
|
Irk, I found another error  I bet the correct version will be even uglier... Actually, it's only if the Offset is non-zero - the offset was applied to the x and y values, but not when calculating the radius. I've updated the formula in the .zip file, and added a Disc formula. Not particularly interesting visually (even after zooming out, which is totally necessary), but with some good offsets/perturbations, transformations, and coloring algorithms it becomes more interesting. I should note that this isn't just the disc transform - it maps only to the unit circle, so afterwards I multiply by z^2. It acts similarly to the Swirl; the bailout value seems to work best around 6-16.
|
|
|
|
|
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.
|
|
|
|
kram1032
|
 |
« Reply #8 on: January 18, 2010, 03:32:36 PM » |
|
nice stuff 
|
|
|
|
|
Logged
|
|
|
|
|
matsoljare
|
 |
« Reply #9 on: January 18, 2010, 07:16:06 PM » |
|
Well, as far as i can see, the basic "swirl transformation" is basically about adding a value to the angle that changes in one way or another depending on the distance from zero, while the distance itself is unaltered. And the "pinch" transformation simply applies a function to the distance from zero, without affecting the angle at all. Perhaps a combination of this and the conventional complex squaring function might do something?
I have no idea what you mean by "injective" though, can you explain?
|
|
|
|
|
Logged
|
|
|
|
|
Timeroot
|
 |
« Reply #10 on: January 18, 2010, 07:50:32 PM » |
|
Actually, I'd tried the pinch transform with squaring. No avail. An "injective" function is a function f(x) where each value of x produces a unique value. It's the opposite of a single-valued function. Squaring is not an injective function, because (for example) -1+i and 1-i both have the same result: 0-2i. I expected that the Swirl transform wouldn't do well in creating a fractal because it is injective; it doesn't have any "overlap". The disc transformation I used (read about it, and the eyefish/swirl transform at http://flam3.com/flame_draves.pdf) isn't injective - different parts of the image overlap. I didn't quite use the regular disc transform - I multiplied it by z^2 at the end. And clearly I was wrong about the function needing to be injective for it to be interesting. The fractals weren't half bad! I was thinking it would be cool to make a general Mandelbrot formula for IFS. You could have up to 9 transforms (let's say), specify the affine parts, the variations, and the variables, and the weights, iterate may 100 points for each pixel, but after each transform, you've added the value of the pixel. Color by the percentage of escaping points. Would be an interesting experiment, I say. Anyone want to code it? 
|
|
|
|
|
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.
|
|
|
|
matsoljare
|
 |
« Reply #11 on: January 18, 2010, 10:00:49 PM » |
|
Oh. What happens if you double the angle (the normal for squaring complex numbers) while doing nothing to the distance, then? Or using the square root of the distance instead of the square?
|
|
|
|
|
Logged
|
|
|
|
|
Timeroot
|
 |
« Reply #12 on: January 18, 2010, 10:34:45 PM » |
|
Well, I tested the Mandelbrot set for the doubling the angle/keeping the radius, and it turns out set is composed of all value of z such that Real(z)<0 and Real(z)/Imag(z) equals either ~2.271 or ~-2.271. Very boring, just two lines. My guess is that the argument of those lines are something like 2*pi/Phi, were phi is the golden ratio. Phi is is many ways the "most irrational" number, so it takes the longest to escape.
Taking the squareroot of the radius while doubling the angle created a somewhat interesting shape - mostly the set is just all z with Re(z)<0, but a small area near the origin is fractal. Applying an inverse transform gives a finite, solid shape with two lines running off. Zooming in on the shape reveals "Henon Noise" - Bands of high-iteration noise, shaped somewhat like a henon map. I also tried something where you square z normally, but c is stored in polar coordinates. In each iteration, convert z to polar, add c, convert back. It produced something that looks a lot like a start/sun.
|
|
|
|
|
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.
|
|
|
|
matsoljare
|
 |
« Reply #13 on: January 19, 2010, 03:44:19 PM » |
|
You may also triple the angle while squaring the distance, or double the angle while cubing the distance......
|
|
|
|
|
Logged
|
|
|
|
lkmitch
Fractal Lover
 
Posts: 238
|
 |
« Reply #14 on: January 19, 2010, 08:14:44 PM » |
|
You may also triple the angle while squaring the distance, or double the angle while cubing the distance......
Here are a couple of Mandelbrot images from that technique. First, doubling the angle and raising the distance to the 1.25 power. Second, multiplying the angle by -2 and raising the distance to the 1.1 power.
|
|
|
|
Logged
|
|
|
|
|