Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: kram1032 on April 23, 2013, 12:09:15 AM




Title: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 23, 2013, 12:09:15 AM
(accidentally posted early, still editing, come back a bit later)
The classic (pre-bulb) extension of the Mandelbrot-Set used to be based on Quaternions, since those are a fairly straight-forward extension of complex numbers.
However, there is another extension, that, in the "1-Dimensional" case (where we deal with complex numbers as dimensions) reduces to the complex numbers of norm 1. That would be the unitary group.

The unitary group has multiple parametrizations, one of which is: \left(<br />\begin{array}\frac{2 e^{i q} \cos ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}} & -\frac{2 e^{i r} \sin ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}} \\ \frac{2 e^{i s} \sin ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}} & \frac{2 e^{i (-q+r+s)} \cos ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}}<br />\end{array}<br />\right)
with (p|q|r|s)\in \mathbb{R}.

I chose this parametrization, to make it easy to solve for the various variables. In this form, q, r and s are just phases, while the factors that involve p are between 0 and 1. There are more beautiful parametrizations, however, they make it harder to solve for p, because they are between -1 and 1 and thus mix with the three complex phases, making the seperation more complicated.

Despite that , I still have four different possible values for p after squaring. Solving for the other things isn't as hard.
The main issue I have is that some of the expressions will not reduce all too nicely

Here you go, for the squared case:
a\to a^2
p\to \left( 2 \tan ^{-1}\left(\frac{\sqrt{2} |\sin (p)| \sqrt{\left|\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right|}}{\sqrt[4]{(\cos (2 p)+3)^2-4 \sin ^4(p) \cos^2\left(q-\frac{r}{2}-\frac{s}{2}\right)}}\right) \vee -2 \tan ^{-1}\left(\frac{\sqrt{2} |\sin (p)| \sqrt{\left|\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right|}}{\sqrt[4]{(\cos (2 p)+3)^2-4 \sin ^4(p) \cos ^2\left(q-\frac{r}{2}-\frac{s}{2}\right)}}\right)\vee -2 \tan ^{-1}\left(\frac{2 |\sin (p)| \sqrt{\left|\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right|}}{\sqrt[4]{-8 \sin ^4(p) \cos (2 q-r-s)+28 \cos (2 p)+\cos (4 p)+35}}\right)\vee 2 \tan^{-1}\left(\frac{2 |\sin (p)| \sqrt{\left|\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right|}}{\sqrt[4]{-8 \sin ^4(p) \cos (2 q-r-s)+28 \cos (2 p)+\cos (4 p)+35}}\right) \right)
(where \vee is the symbol for "or", so it's one of the four possibilities. If you were to plot them, you'd see that they are different in just their phase and sign. They are almost the same functions)
q \to \arg \left(\frac{8 e^{2 i q} \cos ^4\left(\frac{p}{2}\right)-8 \sin ^4\left(\frac{p}{2}\right) e^{i (r+s)}}{\sqrt{-8 \sin ^4(p) \cos (2 q-r-s)+28 \cos (2 p)+\cos (4 p)+35}}\right)
r \to \frac{1}{2} (3 r+s) \text{sgn}\left(\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right)
s \to \frac{1}{2} (r+3 s) \text{sgn}\left(\cos \left(q-\frac{r}{2}-\frac{s}{2}\right)\right)

this works in four complex dimensions:
w=a \frac{2 e^{i q} \cos ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}}+c_1
x=-a \frac{2 e^{i r} \sin ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}}+c_2
y=a \frac{2 e^{i s} \sin ^2\left(\frac{p}{2}\right)}{\sqrt{\cos (2 p)+3}}+c_3
z=a \frac{2 \cos ^2\left(\frac{p}{2}\right) e^{i (-q+r+s)}}{\sqrt{\cos (2 p)+3}}+c_4

Since all of those are complex numbers, you also can use four complex constants rather than real ones.

This still needs a bit of work, particularly, I haven't yet shown the inverses for the last four functions yet, which are the actual iteration functions, but it's late now. If anyone is willing to test out this right now admittedly rather messy set, it shouldn't be too hard to find the corresponding inverses.

You'd first have to convert from w, x, y, z to a, p, q, r, s, then replace the four by their squared analogues, then back-convert to w, x, y, z and add constants. This is directly analogous to how you'd do it with any mandelbulb variant, converting between polar and rectangular coordinates.

I'm not sure how best to visualize it as it's effectively an 8-dimensional space to search, but trying out all the major planes sure is a good start.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Tglad on April 23, 2013, 05:01:32 AM
I can't say I understand... if we're taking the norm 1 complex numbers then the z^2 works but the +C will take the value outside of the group.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: simon.snake on April 23, 2013, 03:51:07 PM
Whoosh!

That was the sound of that going over my head extremely fast!


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 23, 2013, 07:28:06 PM
Tglad. Correct and that +C part is what I'm working on right now.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: KRAFTWERK on April 24, 2013, 10:23:01 AM
Those formulas are as beautiful as a close up of the mandelbulb!
Love the look of it, understand none of it!  O0

I hope it will lead to something interesting Kram!  :beer:


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 25, 2013, 03:17:33 PM
I've investigated further and as Tglad hinted at, it's not at all trivial to find a way to "add" in this group without leaving it.
What I need now is a way to have a unitary matrix around any center, rather than around the origin. I'm not quite sure about how to do this.

Just as a comparison:

\left(<br />\begin{array}{cc} w+i x & y+i z \\ -y+i z & w-i x<br />\end{array}<br />\right)
This is a generic quaternion, written as a matrix. If you add any matrix of the same form to it, it will still be a quaternion, and the same is true for multiplication.
Furthermore, if you take the conjugate transpose of this matrix, that is, you mirror it along the \-diagonal and flip the signs of all imaginary values, if you take this new matrix and multiply it to your original matrix, you end up with the squared norm of your quaternion.

Writing this in polar form would be:
r \left(<br />\begin{array}{cc} e^{i p} \cos (a) & e^{i q} \sin (a) \\ -e^{-i q} \sin (a) & e^{-i p} \cos (a)<br />\end{array}<br />\right)<br />
which is close to some forms of the general unitary matrix.

Here I would have:
\begin{array}{cc} r=\sqrt{w^2+x^2+y^2+z^2} & w=r \cos (a) \cos (p) \\ a=\arg \left(\sqrt{w^2+x^2}+i \sqrt{y^2+z^2}\right) & x=r \cos (a) \sin (p) \\ p=\arg (w+i x) & y=r \sin (a) \cos (q) \\ q=\arg (y+i z) & z=r \sin (a) \sin (q)<br />\end{array}
There is a little problem here: a could have been from any quadrant of the complex unit circle, however, this reverse mapping suggests, it only comes from the first (This is analogous to what I tried to prevent to happen in the unitary matrix).

Now, the typical way to write a Unitary matrix (a nicer form than I originally put) is this:
\left(<br />\begin{array}{cc} \cos (a) e^{i (p-s)} & \sin (a) e^{i (p-t)} \\ -\sin (a) e^{i (q-s)} & \cos (a) e^{i (q-t)}<br />\end{array}<br />\right)

If you compare the two, the quaternionic matrix in polar form and the unitary matrix, you'll notice that they are really similar. The unitary matrix essentially differs in that it has two more complex phases.
Now, all I need is to find a way how to rewrite this unitary matrix, which currently is in "polar" form (*), into the cartesian form of the original quaternion matrix.
Once I have that form in a way that's decent to work with, it should be trivial to define addition in a way exactly analogous to the quaternion case.

(*) note that the unitary matrix lacks a radius parameter. This is because unitary matrices are not supposed to change the length of vectors. Unitary matrices are analogous to unit-quaternions which can be used for rotation.
Extending to full quaternion space simply requires to add a radius. Equivalently, you can add a radius to the unitary matrix above and you're set.

What this extension will bring is the ability to have both rotations and reflections in a single generic operation, potentially giving rise to new pretty pictures we haven't seen before.
It will contain an infinite number of copies of the typical, boring Quaternion-Mandelbrot set, and thus an infinite number of Mandelbrot-sets, but maybe, reflections add in something nice we didn't have before.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: cKleinhuis on April 25, 2013, 03:38:19 PM
i have no idea what you are talking about, do you have a clue where to find information on the unitary group !?


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on April 25, 2013, 05:48:42 PM
Isn't that an octonions?


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 25, 2013, 06:07:39 PM
Alef, no, octonions are 8-real-dimensional and can "only" do 8-or-smaller-dimensional rotation.

Unitary transforms are those that preserve all angles and lengths. That's possible in various ways besides rotation. One of them being reflection.
In 2 (real) dimensional space, rotation and reflection are all the possibilities. In higher dimensions, even more complex things are possible.

Equivalently, they preserve the dot-product between two vectors. (Quaternions do this too but unitary transforms are the most general of that sort)
They also have nice properties like U^*U=UU^*=I meaning, that the inverse of a unitary matrix is simply its conjugate transpose. This also is true for quaternions and complex numbers.

Furthermore, these unitary matrices are the group that describes quantum-mechanics.

cKleinhuis:
Wikipedia on unitary matrices (http://en.wikipedia.org/wiki/Unitary_matrix)
Wikipedia on the unitary group (http://en.wikipedia.org/wiki/Unitary_group)
Wolfram MathWorld on unitary matrices (http://mathworld.wolfram.com/UnitaryMatrix.html)

Quick crashcourse for those not familiar with symmetry groups, matrices and linear transformation:
Those are essentially synonymous.
Symmetry groups are systems that have elements which do not change under a given transformation.
Matrices are just a block of numbers. As far as I know, all finite groups can be represented as matrices.
A linear transformation is just a matrix multiplication. If you have a vector and multiply it with any matrix, you transformed it linearly. If that matrix corresponed to a given group, certain points will have remained unchanged.

For instance:
A planar reflection matrix will keep all points along a plane unchanged. Lengths and angles are not affected either.
A rotation matrix will rotate the system around an axis. This axis of rotation stays unchanged. Similarly, all lengths and angles stay the same.
A matrix that scales a linear system will preserve all angles as well as the center point of the transformation.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: fractower on April 25, 2013, 07:36:37 PM
It seems that most if not all interesting escape time fractals have some non-reversible operation. For example the square in the Mandelbrot results in a 2 to 1 mapping of the complex plain. The M-box has folds that result in a 2 (or 3) to 1 mapping. Unitary transformations are reversible by definition. Are you panning to add something non-reversible. It will be interesting to see what you come up with in either case.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: cKleinhuis on April 25, 2013, 07:59:21 PM
Thx kram

addition is problematic with matrices as well. Hence the need for homogonous matrices
what about includinga modulus group? But why not allow the addition being outside?since we want the mset in the xy cutplane staying alive ;)


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 26, 2013, 01:34:07 AM
fractower, unitary matrices are reversible as long as you stick to multiplication. For that matter, so are quaternions and complex numbers.
The unitary group U(1), as already said, precisely is the unit-length complex numbers.
The quaternions of unit length also are a sub-group of the unitary group U(2) which is what I'm trying to use here, except, I want to add in a radius to the unitary matrix.
This radius might ultimately be what causes irregularity. Also, without it, there is no hope of allowing a flexible addition procedure, since all additions would have to land inside the group again, which severely limits what is allowed. (In fact, all allowed additions in that case could be directly and efficiently emulated using a multiplication instead, meaning, they would really just be multiplication in disguise)

cKleinhuis: Basic Matrix addition is very easy, actually. The tricky part really just is to stay inside the group you are currently traversing.
Also, since this is a direct generalization of quaternions as well as complex numbers, the xy-cutplane should be perfectly preserved.
Just remapping what ever you have to what ever is closest inside the group seems rather artificial. It is a possibility but I'd prefer to avoid that. Ideally, I want a direct representation like for the quaternions.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 27, 2013, 12:25:13 PM
Ok, so I found a new form of the unitary group with radius, and that should make it fairly simple.
I can't get rid of one of the phases, but I can seperate it out in a decent way.

So, any unitary matrix can be written in the form:
\left(<br />\begin{array}{cc} w+i x & y+i z \\ -e^{i p} (y-i z) & e^{i p} (w-i x)<br />\end{array}<br />\right)

Now, at least for w,x,y and z, it's obvious how to add a value to this. Just go with w1+w2=w3, etc.
For the phase factor p, it might not be possible to define a consistent, non-artificial addition.
This worries me a bit. All this does is interpolating between a whole bunch of quaternion-like structures, with the quaternions you know and love happening for p=2\pi n where n\in \mathbb{Z}.
For the opposing case with p=2\pi n+\pi where n\in \mathbb{Z}, you get what corresponds to a typical reflection, instead of rotation. All in between gives you some transforms that are somewhere between reflections and rotations. I can only hope, that something interesting lies in that space. I'm about to write down implementable square-M-Set equations for this, where summing over the p values isn't allowed. ALTHOUGH...
I could potentially add a way to also add phases. It would be slightly artificial but it would still not leave the space and might add some interesting extra dynamics. (It also would add another parameter to play with)
In any case, if nothing else, this probably will lead to some nice vary-the-p-parameter animations between possibly before unseen variants of the quaternion mandelbrot set.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 27, 2013, 01:03:17 PM
Without phase addition (here, you have to always match the phase of c with the phase of z which changes during squaring, so it is also slightly artificial) :
\left(Z|C\right)\in \mathbb{U\left(2\right)}\times \mathbb{R}^+_0}, Z\to Z^2+C:
Z=\left(w,x,y,z,p\right)
C=\left(a,b,c,d,q\right)
Z\to Z^2=\\w\to w^2-x^2-\left(y^2+z^2\right)\cos\left(p\right)\\x\to 2 w x - \left(y^2+z^2\right)\sin\left(p\right)\\y\to w y - x z + \left( w y + x z \right)\cos\left(p\right)+\left(x y - w z\right)\sin\left(p\right)\\z\to x y + w z + \left(w z - x y\right)\cos\left(p\right)+\left(w y + x z\right)\sin\left(p\right)\\p\to 2p := q

and then

Z\to Z+C =\\w\to w+a\\ x\to x+b\\ y\to y+c\\ z\to z+d \\q = p

Repeat.

The q=p part is supposed to mean, that what ever the current phase of Z is, take it as phase for C.

Next I will try to give a form that allows C to have a phase independent of Z, even if, as already said, that definition will be slightly arbitrary.

Power n should also be easily possible, but as usual, the complexity of this will go up a lot in that case.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 27, 2013, 01:18:03 PM
Ok, so keeping everything else the same, define the sum of phases (p|q) to be:

p+q := \arg \left(e^{i \phi} \left(e^{i p}+e^{i q}\right)\right)
with \phi being a tweak- /animatable parameter, defaulting to 0.

In that case, instead of setting C's current phase to what ever Z's phase is, you can set them to be independend.

\left(Z|C\right)\in \mathbb{U\left(2\right)}\times \mathbb{R}^+_0}, Z\to Z^2+C:
Z=\left(w,x,y,z,p\right)
C=\left(a,b,c,d,q\right)

Z\to Z^2=\\w\to w^2-x^2-\left(y^2+z^2\right)\cos\left(p\right)\\x\to 2 w x - \left(y^2+z^2\right)\sin\left(p\right)\\y\to w y - x z + \left( w y + x z \right)\cos\left(p\right)+\left(x y - w z\right)\sin\left(p\right)\\z\to x y + w z + \left(w z - x y\right)\cos\left(p\right)+\left(w y + x z\right)\sin\left(p\right)\\p\to 2p


Z\to Z+C =\\w\to w+a\\ x\to x+b\\ y\to y+c\\ z\to z+d \\p \to \arg \left(e^{i \phi} \left(e^{i p}+e^{i q}\right)\right)

If it helps, the complex argument function can be written in terms of real functions as
\tan ^{-1}(-\sin (a) \sin (p)+\cos (a) \cos (p)-\sin (a) \sin (q)+\cos (a) \cos(q),\sin (a) \cos (p)+\cos (a) \sin (p)+\sin (a) \cos (q)+\cos (a) \sin (q))
- Careful though: as written here, it's \tan ^{-1}(\mathbb{\R},\mathbb{\I}). In most implementations, Atan2 has the real and imaginary part filpped.

There is one more natural definition of phase addition that does not rely on any additional parameter, and you can find it in the next post, where the whole algebra is defined in terms of vectors instead of matrices, so it's easy to code them together.

In the end it turns out that this formulation is 5-dimensional.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 27, 2013, 02:30:59 PM
Just so you can try different configurations, including things like higher-power mandelbrot sets, various polynomials or Möbius transforms:
Take two unitary numbers (as they now may be called) :
\left(Z|C\right)\in \mathbb{U\left(2\right)}\times \mathbb{R}^+_0, as well as a real constant parameter \phi \in \mathbb{R} defaulting to 0
with Z=(w,x,y,z,p) and C=(a,b,c,d,q), all those values \in \mathbb{R}

further define: \|Z\|=\sqrt{w^2+x^2+y^2+z^2}=r and analogously \|C\|=\sqrt{a^2+b^2+c^2+d^2}=s

Then I already defined their addition as either:
Z+C = \left(w+a\\ x+b\\ y+c\\ z+d \\q = p\right)
or:
Z+C =\left(\\ w+a\\ x+b\\ y+c\\ z+d \\ \arg \left(e^{i \phi} \left(e^{i p}+e^{i q}\right)\right)\right)
OR:
Z+C =\left(\\ w+a\\ x+b\\ y+c\\ z+d \\ \arg \left( r e^{i p}+s e^{i q}\right)+\phi\right)-for \phi=0, this last one actually should be the most natural definition, directly analogous to what would actually happen in complex numbers. However, it's still arbitrary in some ways.
This is the only ambiguous definition.
I'd recommend, however, to try out all three and see what results in interesting stuff. Fractals tend to be most interesting where you add in arbitrary definitions that are not quite as nice as "correct" addition.

Furthermore we have:

Z \times C = \left(a w - b x -\left(c y + d z\right)\cos\left(q\right)+\left(c z - d y\right)\sin\left(q\right)\\a x+b w-\sin (q) (c y+d z)+\cos (q) (d y-c z)\\\sin (q) (b y-a z)+\cos (q) (a y+b z)+c w-d x\\ \sin (q) (a y+b z)+\cos (q) (a z-b y)+c x+d w\\p+q<br />\right)

and lastly:

Z^{-1}=\frac{1}{r} \left( w \\-x\\-y \cos (p)-z \sin (p)\\y \sin (p)-z \cos (p)\\-p<br />\right)

Very much like what would happen in quaternions.
I'll look into what happens if you do a corresponding exponential function which would give rise to all kinds of other interesting transformations.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on April 28, 2013, 11:40:34 PM
So if there is any "true" way to deal with varying phases during addition, I still don't see it.
However, somewhat analogous to the sign varying MSets that were going on a while ago, where the iteration is altered by randomly flipping the imaginary part of z, e.g. randomly taking z orz^* as variable to be iterated, I have yet another idea:

Instead of sticking to any fixed rule of what the phase would be after addition, you could just make it be random.
In that variation, you wouldn't even have to keep track of the phase, since after each addition, it would be independendly random again anyway.
In that case, you have a standard quaternion M-set, but with the slight change, that the current product of two numbers (or the current square of a number) depends on a random phase.
This would give rise to irregularities that might break down the boring, circular form of typical quaternion m-sets.

To do this, just do:

Z, C are typical quaternions. Additionaly, you introduce a random variable \phi that changes each iteration.
\phi slightly changes how you'd usually square Z in a way, similar to the rules given in the previous post.

That way you have for each iteration:

Z \to Z^2+C=\left(w\to w^2-x^2-\left(y^2+z^2\right)\cos\left(\phi\right)+a\\x\to 2 w x - \left(y^2+z^2\right)\sin\left(\phi\right)+b\\y\to w y - x z + \left( w y + x z \right)\cos\left(\phi\right)+\left(x y - w z\right)\sin\left(\phi\right)+c\\z\to x y + w z + \left(w z - x y\right)\cos\left(\phi\right)+\left(w y + x z\right)\sin\left(\phi\right)+d\right)\\ \phi \to \text{random real}
This should be really easy to implement.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on April 29, 2013, 05:25:11 PM
Waiting for pictures.
It have 4 parts when it's 3D, so as I understand, 4th allaway are 0 :hmh:


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 01, 2013, 11:25:00 AM
Well, you know how quaternion mandelbrot sets work. This is almost the same.

Or alternatively, you know the cut-planes through Mbulb, Mbox, etc. - You could do a cut-space instead or also try cut-planes.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 01, 2013, 05:21:06 PM
Will try it. with random numbers seems to be the most easy one, cos I'm not shure about numerical value of p and probably could make lots of mistakes. Is p just a complex angle? Or somehow a value of a quadrant , (1, i) or (-1, i)


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 02, 2013, 12:59:28 PM
p is any real. It's an angular value, so it's sufficient to constraint it to \left[-\pi,\pi\right] but if it's not constraned by that, it works just fine as well, since the function wraps around anyway.

As said, in those Z and C above, all interior values are reals.
\left(a|b|c|d\right) \in \mathbb{R}\text{, } \left(w|x|y|z\right) \in \mathbb{R}\text{, } p \in \mathbb{R} \text{ and } q \in \mathbb{R}

That being said, e^{i p} is of course any value on the complex unit circle. It's equal to \cos{p} + i \sin{p} where \cos{p} and \sin{p} are also reals, but the combination, of course is, a complex number. - one that satisfies \|e^{i p}\|=1.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 03, 2013, 03:12:27 PM
Tried random thing. Different random seeds generate different shapes but result allways is very quaternion like aka revolution surface. Julias are a bitt more interesting throught.
Didn't tried non random, I not quite understand how then does p is calculated and alsou I want to spend time more on finetuning contest images.

Code were like this. Alsou tried with fi = temp:
Code:
temp= seed= random(seed);
fi=( (12*pi*temp) /(randomrange));


 Cx=real(C); Cy=imag(C); Cz=part_j(C); Cw=wplane;//part_k(C);
 zx=real(z); zy=imag(z); zz=part_j(z); zw=part_k(z);
 
 zzx = 2*zw*zx -(zy*zy+ zz*zz)*cos(fi)  +Cx;
 zzy = zw*zy -zx*zz  + (zw*zy +zx*zz)*cos(fi)+ (zx*zy-zw*zz)*sin(fi) +Cy;
 zzz = zx*zy +zw*zz +(zw*zz-zx*zy)* cos(fi)+ (zw*zy + zx*zz)*sin(fi) +Cz;
 zzw = zw*zw-zx*zx - (zy*zy+zz*zz)*cos(fi) +Cw;
 z= quaternion(zzx, zzy, zzz, zzw);
zx=zzx;
zy=zzy;
zz=zzz;
zw=zzw;


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 04, 2013, 01:50:18 PM
Ok, for the three different kinds of addition I thought of:

The first one with p=q essentially is what you're doing right now already, except
Instead of randomly assigning a new p in each iteration, you randomly assign one at the first iteration and then double it each iteration. - since the phase of C always is set to the phase of Z, you don't actually need to keep track of an individual phase for C.
p=2p

The second one, you assign a random phase to Z and a random phase to C at the first iteration, and also decide on a third phase factor \phi that is fixed. - if you just put that third phase to 0, the term e^{i \phi} becomes 1.

Then you take your three phases p, q, \phi and plug them into the formula arg(e^{i \phi}\left(e^{i p}+e^{i q}\right), to obtain your new p. Since in a typical M-Set, C is constant, so would be q. Similarly, \phi is constant. Only p changes.

For the last form, you weight the phases with the respective radii of the numbers. E.g. you have:
r=\sqrt{w^2+x^2+y^2+z^2}
s=\sqrt{a^2+b^2+c^2+d^2}
p = \arg\left(r e^{i p}+s e^{i q}\right)+\phi - where again, q and \phi are constants, and you might want to set \phi to 0.

It's simply another variable to keep track of, and you plug it in the same formula over and over again, just like you'd do for the other forumlae.

Maybe also try other cut-spaces to see what other structures lie in this. - although I kinda expected this after finally figuring out how the multiplication and stuff worked out, especially for this random version.

There is a certain ridge in it that I'd not expect on a quaternion M-set. You can see where it opens up. That's unusual for an integer power M-set. Typically, this would only occur on non-integer powers...
That suggests, that the shape isn't perfectly symmetric and if you cut through it, you'll find slighthly distorted M-sets on any but the "main" plane which should still be a perfectly undistorted M-set.

That ridge might also be a result of sampling over the entire space randomly, rather than constraining it to any "proper" rule. - It shows the entire capabilities of this added phase. As said, it should add a reflection to the mix, that originally only was rotation.  If you reduce the sampling space, you should end up with a bit more defined structures. Depending on the phase you choose, you'll end up with something that's pretty much exactly like the "normal" rotation M-set (namely for exactly p=0) or with a set that's based entirely on reflection (if I'm not mistaken, it should be at p=\pi) or, for all the other values, anything in between.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 07, 2013, 01:20:12 PM
Rendered the same random version formula with cutout. Not as expected;) Interesting enought the same fractal without any cutout looks like some bell like revolution surface, and with a cutout it's something other. I used following code for a cutout, so resulting random sequence is different as if region is cuted it automaticaly bails out on the first iteration.

Code:
//initialisation
autobailout=0;
if (coordZ!=0 && part_j(pixel) < coordZ )
{
autobailout= bailout +1;
}
//loop
//formula code are here

//bailout
return( |z|+ autobailout < bailout);

Random seed is 1, 40 iterations, colouring by orbits on 2 iteration, same wievport. If I remember my cutout code correctly:

- Cuted of region z<0 (smooth surface, sand colouring).
- Cuted of region z>0, x>0 (fuzzy surface).
- Cuted of region z<0 and x<0 ( quarter, smooth surface).
- No cutouts.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 07, 2013, 04:42:45 PM
It looks severely undersampled but these are sort of expected for a purely random case.
Did you already try to, rather than randomly switching the phase each iteration, doubling it? - That would be the first kind of addition I proposed and it should be almost the same as what you have now. Except that you only need to randomly generate a number once and then double it, rather than once per iteration.

What exactly is the difference between the first "whole" set and the second one, the unitary bell?
Did you look at a different set of axes?


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 13, 2013, 06:17:11 PM
Changed random formula so that each point during iterations would go throught the same trajectory of random numbers. So  now it's smooth.

Initialisation:
doonce=0;

Iteration loop:

if (doonce==0)   
{
temp= seed2= random(seed);
doonce=1;
}
else
{
temp= seed2= random(seed2);
}
fi=temp;

///previous formula code

It looks like there are 2 different versions:
- fi trajectory for every point is different. Result looks fuzzy. Start iteration of point with random fi, then during iterations pick random fi or (if I 'm correct) when multiplying fi by 2.

- fi trajectory is identical for all points. Result looks smooth.
Say, fi value during iterations is random but iteration of every point starts with the same random seed, so that trajectory of fi values is the same. Like in this example. Or just chose some starting value of fi and do with it wathever you like.

 Images with starting seed =1.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 14, 2013, 10:15:56 AM
those already look a lot better. The cross-section is interesting.
So the images you showed are for a constant \phi per point, that doesn't change at all?

The "correct" version would be a \phi per point that would double each iteration, so \phi \to 2\phi. Is that already causing fuzziness?


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 15, 2013, 06:56:34 PM
Random numbers are generated by arithmetical methods, so they aren't undetermined random. If each point is started with same random seed, then for each point next generated random numbers are the same. So neigbouring points are simmilar and result is smooth.

If starting seed for each point is different, then it's proper randomness, but then random number generates totally different sequences, each point is different and result is fuzzy.

First seed = starting seed.
seed (of iteration n+1)= random number = random(seed(of iteration n)  ) 

But with Ф (n+1) = Ф (n) x 2 in 3D it will be a smooth rotation surface like of example above.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 15, 2013, 07:01:21 PM
Ok, that sounds more like what I actually expected.
Nothing of this really is a surprise. Let's see now, what other types of addition give. Can you tell me precisely with what you need help to implement them?

If those don't give anything interesting either, all that's left to do is wild experimentation until something interesting pops up. As usual. :D

Oh, and Julia-sets will be interesting to look at too.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 15, 2013, 07:13:23 PM
Some easy formula;)
In the shape:

iteration (n)
x= ... +C
y=.... +C
z=...  +C

Ф =some sort of(Ф)

But I think, everything correct quaternion like would result in revolution surface what is kind of boring.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 15, 2013, 09:33:18 PM
Ok, so w,x,y and z never change.
What changes is \phi
You already tried out the first method and a variation of it.

What's left is:
\phi \to arg(e^{\phi+\psi})

or


\phi \to arg(r e^{\phi} + s e^{\psi})

Where \phi is the phase of z and \psi the phase of c.

And yeah, it's not all that unlikely that all of them will basically look like revolution surfaces. After those initial experiments, it might be a nice idea to just randomly mess around with signs or factors, to get slightly different formulae that might be able to produce far more interesting dynamics and behaviours. Just try to apply such an additional phase factor to other kinds of 3D M-Sets that already are known to produce interesting things. Maybe, some new and interesting things emerge.
Also to be tried are things like higher powers or other functions. I already provided generic multiplication and division, and except for the phase factor, addition is well defined too.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 16, 2013, 03:19:25 PM
Ok, so w,x,y and z never change.
What changes is <Quoted Image Removed>
You already tried out the first method and a variation of it.

What's left is:
<Quoted Image Removed>

or


<Quoted Image Removed>

Where <Quoted Image Removed> is the phase of z and <Quoted Image Removed> the phase of c.


OK. I will try.
Then this is:  :hmh:


Ф (0) = some number.
Ksi (n) = Ф (n-1)
Ф (n+1) = arg(e^(Ф (n)+Ksi(n) )  )

Am I right, Ksi is the Ф of previous iteartion? Or they are unrelated whatever picked numbers?

But then arg is deffined as angle of complex argument. But if Ф and Ksi are real numbers, then e^(Ф+ Ksi) is real number and so there is no complex angle. Ahh, forgot what was complex powers, but complex powers alsou resulted in real value.

Then I understand Ф (n+1) = arg ( e^Ф (n) + i*e^Ksi(n) )  :hmh:

Preferably could you explain it in plain text becouse in my phone latex aren't visible.


But I think revolution should be becouse of formula quadratic polynomial part. I think, changing quadratic parts could result in not revolution.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 16, 2013, 10:29:47 PM
I should have been more careful with consistency, but I'll roll with this now:

Z was made up of w,x,y,z,\phi
C was made up of a,b,c,d,\psi

So the \psi here isn't related at all to the previous iteration of \phi. It's a constant phase, just like a,b,c and d are constant components of C.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: jehovajah on May 17, 2013, 09:50:28 AM
Hooray for Alef!

I do not know where we would be if Alef did not take an interest in visualizing these weird concepts. Thanks man!

These equations are Grassmann Forms, but very few would know that.


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: Alef on May 17, 2013, 01:01:22 PM
Hooray for Alef!

I do not know where we would be if Alef did not take an interest in visualizing these weird concepts. Thanks man!

These equations are Grassmann Forms, but very few would know that.
Thanks  :D

I should have been more careful with consistency, but I'll roll with this now:

Z was made up of w,x,y,z,<Quoted Image Removed>
C was made up of a,b,c,d,<Quoted Image Removed>

So the <Quoted Image Removed> here isn't related at all to the previous iteration of <Quoted Image Removed>. It's a constant phase, just like a,b,c and d are constant components of C.

Well. But if Ksi and Fi are real numbers, how equation -> =e^(Ф (n)+Ksi(n) ) would produce complex number. arg or atan2 calculates complex angle, but without complex number there are no complex angle to calculate. Shouldn't it be Ф (n+1) = arg(e^(Ф (n)+i*Ksi(n) )  ) :hmh: Or does Ksi are imaginary number?


Title: Re: Attempt at Unitary Mandelbrot Set
Post by: kram1032 on May 17, 2013, 04:59:29 PM
Oh, I'm sorry, I forgot an i in those exponential equations


\phi \to arg(e^{i\left(\phi+ \psi\right)})

or


\phi \to arg(r e^{i \phi} + s e^{i \psi})

Now it should make more sense, I hope.