add mandelbrot.3 from wordpress (mostly)
This commit is contained in:
parent
af637a2a3e
commit
29ea125b84
401
mandelbrot/3/index.qmd
Normal file
401
mandelbrot/3/index.qmd
Normal file
@ -0,0 +1,401 @@
|
||||
---
|
||||
format:
|
||||
html:
|
||||
html-math-method: katex
|
||||
---
|
||||
|
||||
|
||||
Clubs and Spades: Mandelbrot beyond iii
|
||||
=======================================
|
||||
|
||||
This post assumes you have read the [one previous](), which discusses some 3D number systems, i.e., numbers which feature two imaginary components, which produce interesting figures when applying the Mandelbrot map. This post will discuss 4D analogues, which behave a bit better in some regards.
|
||||
|
||||
|
||||
A Step to the Ana
|
||||
-----------------
|
||||
|
||||
For all of the challenges that 3D space presents, thing worsen in 4D. Assuming distributivity over addition, multiplication is characterized as:
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
q_1 q_2 = (a + bi + cj + dk) (e + fi + gj +hk) \\
|
||||
\begin{matrix}
|
||||
=~ ae &+\ (be + af)\boldsymbol{i} + (ag + ce)\boldsymbol{j}
|
||||
+ (ah + de)\boldsymbol{k} \\
|
||||
&+\ bf\boldsymbol{i^2} +\ bg\boldsymbol{ij} + bh\boldsymbol{ik} \\
|
||||
&+\ cf\boldsymbol{ji} +\ cg\boldsymbol{j^2} + ch\boldsymbol{jk} \\
|
||||
&+\ df\boldsymbol{ki} +\ dg\boldsymbol{kj} + dh\boldsymbol{k^2}
|
||||
\end{matrix} \\ \\
|
||||
= \Sigma \left(
|
||||
\begin{pmatrix}
|
||||
ae & af & ag & ah \\
|
||||
be & bf & bg & bh \\
|
||||
ce & cf & cg & ch \\
|
||||
de & df & dg & dh
|
||||
\end{pmatrix}
|
||||
\odot
|
||||
\begin{pmatrix}
|
||||
1 & i & j & k \\
|
||||
i & i^2 & ij & ik \\
|
||||
j & ji & j^2 & jk \\
|
||||
k & ki & kj & k^2
|
||||
\end{pmatrix}
|
||||
\right ) \\ \\
|
||||
= \Sigma \left(
|
||||
P_4 \odot
|
||||
\begin{pmatrix}
|
||||
1 & i & j & k \\
|
||||
i & & | & \\
|
||||
j & - & M & - \\
|
||||
k & & | &
|
||||
\end{pmatrix}
|
||||
\right )
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
*M* is now a 3×3 block, meaning that the imaginary axes now form a 3D space unto themselves.
|
||||
|
||||
This time, I will outline some nice properties that multiplication should have among the imaginary components, and the corresponding rules for *M*:
|
||||
|
||||
- Multiplication must be either commutative or anticommutative
|
||||
- *M* must be either symmetric or skew-symmetric. That is, elements and their reflection over the main diagonal are either the same or have opposite sign.
|
||||
- Multiplication must not be absorbative. That is, $i^2 \neq i,~ij \neq i$
|
||||
- *M* must not contain any of *i*, *j*, or *k* on their own columns.
|
||||
- Multiplication must be at least partially associative
|
||||
- *ijk* must have a single value
|
||||
- This property is difficult to ascertain immediately from *M*, but will be apparent in at least one cubic form.
|
||||
- All products must have magnitude 1
|
||||
- *M* must contain only 1, *i*, *j*, *k*, or their additive inverses
|
||||
- For most multiplicands, the product has extent in all three imaginary directions
|
||||
- Every imaginary term appears at least once in *M*
|
||||
|
||||
Along with *M*, I will be giving its determinant. This value doesn't appear to be meaningful *per se*, but it does function as a sample of products. If the multiplication described is anticommutative, the determinant can have multiple values, but I will use standard Laplace expansion and ($ad - cb$) as 2×2 determinants to keep things consistent.
|
||||
|
||||
|
||||
Glimpsing 4D
|
||||
------------
|
||||
|
||||
It is considerably more difficult to visualize four dimensional objects than those of lower dimension. Four separate slice videos will be produced along various planes for each multiplication:
|
||||
|
||||
1. The 1i plane and advancing in the j direction ($\mathfrak K(q) = 0$)
|
||||
2. The ij plane and advancing in the real direction ($\mathfrak K(q) = 0$)
|
||||
3. The jk plane and advancing in the i direction ($\mathfrak R(q) = 0$)
|
||||
4. The jk plane and advancing in the real direction ($\mathfrak I(q) = 0$)
|
||||
|
||||
Any object with four dimensions can be coerced into an input for the set (i.e., mapped onto the hypercube $[-2, 2]^4$). For example, images are 2D, with the color at any one pixel being 3D; this is five dimensions in total, more than enough. Thus, each we can interpret each 2D slice above as an "input image". The image coordinates correspond to the real and i components (centered on the origin; positive i toward the top, positive reals toward the right). Meanwhile, hue angle corresponds to j ($[-180°, 180°) \mapsto [-2, 2)$), and saturation to k ($[0, 1] \mapsto [-2, 2]$).
|
||||
|
||||
Using this technique, I will produce four more 2D slices:
|
||||
|
||||
a. Repeating the 1i components in jk: $~a + bi + aj + bk$
|
||||
b. Reversing the 1i components in jk: $~a + bi + bj + ak$
|
||||
c. Sharing the imaginary component across ijk: $~a + bi + bj + bk$
|
||||
d. A "footprint": $~a + bi + \theta j + \alpha k$
|
||||
|
||||
$$
|
||||
\theta = \frac{2 \text{atan2}(b,a)}{\pi},~
|
||||
\alpha = 2\max(|a|, |b|) - 4
|
||||
$$
|
||||
|
||||
The footprint is not intended to show detail, but to function as a tool to identify similar multiplications.
|
||||
|
||||
::: {}
|
||||
![]()
|
||||
2D slice input images. Clockwise from top left: a, b, d, c
|
||||
:::
|
||||
|
||||
|
||||
Starting Simple: Eighth Roots
|
||||
-----------------------------
|
||||
|
||||
Two- and three-dimensional numbers are produced from the fourth and sixth roots of unity respectively. Therefore it should stand to reason that we can produce 4D numbers from the eighth root of unity. Using the intuition from the sixth root, the eighth roots lie on the vertices of a regular octagon. Opposite points can be connected, corresponding to the positive- and negative-going directions. With two of these points occupied by the reals, there are three remaining pairs, any of which could correspond to *i*, *j*, or *k*. There are 6 ways to select the axes, as well as 2^3^ = 8 possible sign orientations.
|
||||
|
||||
In 3D, this strategy made 8 matrices, of which 4 were the same. Instead of doing the same for all 48 choices, I will only show one: where *i* is on the vertical and *j* and *k* are on either side of 1. Multiplication is commutative (and associative) for roots of unity, so:
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = -1,~ j^2 = i,~ k^2 = -i,~ jk = 1
|
||||
~\Rightarrow~ ijk = i\\
|
||||
M_8 = \begin{pmatrix}
|
||||
-1 & -k & j \\
|
||||
-k & i & 1 \\
|
||||
j & 1 & -i
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M_8| &= i^2 - i j^2 + i k^2 - 2 j k + 1 \\
|
||||
&= i^2 - i^2 - i^2 - 2 + 1 = 0
|
||||
\end{matrix}
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
::: {}
|
||||
![]()
|
||||
Clockwise from top left: 1*i* plane, *j* direction; *ij* plane, 1 direction; *jk* plane, 1 direction; *jk* plane, i direction. All subsequent videos will follow the same scheme.
|
||||
:::
|
||||
|
||||
In the top left slice video, somewhat unsurprisingly, the original Mandelbrot set still appears. Interestingly, the bottom two slices approach the same figure at $\Re(q) = 0$, despite growing differently.
|
||||
|
||||
![]()
|
||||
|
||||
Both the split-complex and the complex sets appear within the images, albeit rotated. This resembles the case with the sixth root cylinder, and that this multiplication scheme is also a hybrid of the two sets.
|
||||
|
||||
|
||||
Square Symmetry
|
||||
---------------
|
||||
|
||||
Just as the group of rotations on a triangle were discussed in 3D, rotations on squares can be described in 4D. Half-turns correspond to *i*, and clockwise and counterclockwise quarter-turns correspond to either of *j* and *k*. Predictably, this means that *j* and *k* are fourth roots of unity, effectively recreating the complex numbers.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = 1,~ j^2 = k^2 = i,~ ijk = i \\
|
||||
M_\square = \begin{pmatrix}
|
||||
1 & k & j \\
|
||||
k & i & 1 \\
|
||||
j & 1 & i
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M_\square| &= -i j^2 + 2 j k - i k^2 - 2 \\
|
||||
&= -i^2 + 2 - i^2 - 2 = -2
|
||||
\end{matrix}
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
Since the multiplication has no explicit change in sign, the slices tend to reflect the *split-complex* set rather than the complex one. The original complex set is still visible among the top right slices, windowed by the split-complex set. This is due to the effect of the two fourth roots *j* and *k* reproducing the 2D complex numbers.
|
||||
|
||||
![]()
|
||||
|
||||
The footprint looks similar, especially the stray red spot and upper blob. The rest are just more of the same split-complex set, although one is sheared into rectangle instead.
|
||||
|
||||
|
||||
Quaternions
|
||||
-----------
|
||||
|
||||
Quaternions are the most common 4D extension of the complex numbers. Discovered by Hamilton for the purpose of expressing rotations in 3D, they are a major progenitor of vector analysis. Unlike the previous two systems, quaternions are anticommutative and no imaginary axis is distinguished from another.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = j^2 = k^2 = ijk = -1 \\
|
||||
M_H = \begin{pmatrix}
|
||||
-1 & k & -j \\
|
||||
-k & -1 & i \\
|
||||
j & -i & -1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M_H| &= -1(1 + i^2) - k(k - ji) - j(ki - j) \\
|
||||
&= -i^2 - j^2 - k^2 - 1 - 2ijk = 4
|
||||
\end{matrix}
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
The quaternions are very spherical, since the imaginary elements satisfy $-i^2 - j^2 - k^2 = 3$. This property is what allows the quaternions to describe 3D rotations so gracefully, and it should no surprise that such figures appear in the slices.
|
||||
|
||||
![]()
|
||||
|
||||
The top left and bottom right slices are the same since they combine the real axis and two imaginary directions. The spheres are most apparent in the subspace where $\Re(q) = 0$. The original Mandelbrot set comes into view in the upper right (and to a degree, in the two slices that are the same), perhaps unsurprisingly, since quaternions extend imaginary numbers so naturally.
|
||||
|
||||
![]()
|
||||
|
||||
The footprint is now decidedly different, with three red spots. Further, the original set appears when all three imaginary components are the same. Although slightly deformed, it shows that the three imaginary components, taken all at once, partially recombine to form the original complex numbers. The other two images appear to be near the main cardioid, especially when compared with the reproduced set.
|
||||
|
||||
|
||||
Dihedral Group of Order 8
|
||||
-------------------------
|
||||
|
||||
A similar anticommutative multiplication corresponds to a dihedral group. It describes another set of symmetries on a square: *i* corresponds to quarter turns and *j* and *k* correspond to reflection over either diagonal. This means that *i* remains a fourth root of unity, while *j* and *k* are both second roots of unity; they are distinguished from each other in how they interact with *i*.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = -1,~ j^2 = k^2 = ijk = 1 \\
|
||||
M_\diamond = \begin{pmatrix}
|
||||
-1 & k & -j \\
|
||||
-k & 1 & -i \\
|
||||
j & i & 1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M_\diamond| &= -1(1 + i^2) - k(-k + ji) - j(-ki - j) \\
|
||||
&= -i^2 + j^2 + k^2 - 1 + 2ijk = 4
|
||||
\end{matrix}
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
The *ij* (or *ik*) pair form the hyperbolic equation $j^2 - i^2 = 2$ and the *jk* pair form the circular equation $j^2 + k^2 = 2$. Therefore, we might expect that the slice videos correspond to different conics...
|
||||
|
||||
![]()
|
||||
|
||||
...which is the case. The top left image features two hyperbolic "ghosts" of the original Mandelbrot set which come together, while the top right and bottom left show hyperboloids. The bottom right slices either a sphere, which was not predicted, or the solid of revolution of the split-complex set.
|
||||
|
||||
![]()
|
||||
|
||||
The first two images appear to be along two hyperbolic asymptotes. Contrary to the quaternions, the set when all three imaginary components recombine is the split-complex one. The footprint is also the first to contain any black, or more accurately, any points whose image coordinates satisfy the membership condition of the set.
|
||||
|
||||
Though not shown, it is also certain that the set corresponding to the dual numbers also lies somewhere within this maze of an algebra, since $a + bi + bj \cong a + b\epsilon$. The manifold conic figures and multitude of alternative sets combine to make this the multiplication I find most interesting.
|
||||
|
||||
|
||||
Mandelbrot Menagerie
|
||||
--------------------
|
||||
|
||||
Unfortunately, the above examples are the most well-defined systems. Nonassociativity pervades other options. Though the Mandelbrot set pertains to the action of squaring rather than cubing, its shape becomes unstable when multiplication is not associative. Thus, the remainder of the post will be dedicated to a showcase of some "better" systems. For each, I will show a single example alongside *M*.
|
||||
|
||||
|
||||
### Triply Split-Complex
|
||||
|
||||
The square rotation group, but with the lower right 2×2 block rotated. This algebra appears to be associative, but is exceptionally uninteresting.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = j^2 = k^2 = ijk = 1 \\
|
||||
M = \begin{pmatrix}
|
||||
1 & k & j \\
|
||||
k & 1 & i \\
|
||||
j & i & 1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M| &= -i^2 + 2 i j k - j^2 - k^2 + 1 \\
|
||||
&= -1 + 2 - 1 - 1 + 1 = 0
|
||||
\end{matrix}
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Triply Complex
|
||||
|
||||
Quaternions, but commutative and without negative co-products. Can also be seen as the above, but with reversed sign on the main diagonal.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = j^2 = k^2 = ijk = -1 \\
|
||||
M = \begin{pmatrix}
|
||||
-1 & k & j \\
|
||||
k & -1 & i \\
|
||||
j & i & -1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M| &= i^2 + 2 i j k + j^2 + k^2 - 1 \\
|
||||
&= -1 - 2 - 1 - 1 - 1 = -6
|
||||
\end{matrix} \\
|
||||
i^2 j = -j \neq j = ik = i(ij)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Negi-Dihedral
|
||||
|
||||
The dihedral group, but negated (i.e., with negated squares). Still anticommutative, but has two fourth roots and one second root of unity.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = 1,~ j^2 = k^2 = ijk = -1 \\
|
||||
M = \begin{pmatrix}
|
||||
1 & k & -j \\
|
||||
-k & -1 & -i \\
|
||||
j & i & -1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M| &= (1 + i^2) - k(k + ji) - j(-ki + j) \\
|
||||
&= 1 + i^2 - k^2 - j^2 + 2ijk = 2
|
||||
\end{matrix} \\
|
||||
i^2 j = j \neq -j = ik = i(ij)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Anti-Dihedral
|
||||
|
||||
The dihedral group, but commutative.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = ijk = -1,~ j^2 = k^2 = 1 \\
|
||||
M = \begin{pmatrix}
|
||||
-1 & -k & -j \\
|
||||
-k & 1 & i \\
|
||||
-j & i & 1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M| &= i^2 + 2 i j k - j^2 - k^2 - 1 \\
|
||||
&= -1 - 2 - 1 - 1 - 1 = -6
|
||||
\end{matrix} \\
|
||||
j^2k = k \neq -k = ji = j(jk)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Negi-Dihedral
|
||||
|
||||
The dihedral group, but negated (i.e., with negated squares). Still anticommutative, but has two fourth roots and one second root of unity.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = j^2 = k^2 = ijk = 1 \\
|
||||
M = \begin{pmatrix}
|
||||
1 & k & -j \\
|
||||
-k & 1 & i \\
|
||||
j & -i & 1
|
||||
\end{pmatrix},~
|
||||
\begin{matrix} |M| &= (1 + i^2) - k(-k - ji) - j(ki - j) \\
|
||||
&= 1 + i^2 + j^2 + k^2 - 2ijk = 2
|
||||
\end{matrix} \\
|
||||
i^2j = j \neq -j = ik = i(ij)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Anti-Eighth Root
|
||||
|
||||
The multiplication based on the eighth roots of unity, but anticommutative. This one is significantly more ill-defined than those previous, and its determinant will not be calculated.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = -1,~ j^2 = k^2 = i,~ ijk = i \\
|
||||
M = \begin{pmatrix}
|
||||
-1 & -k & j \\
|
||||
k & i & -1 \\
|
||||
-j & 1 & i
|
||||
\end{pmatrix} \\
|
||||
j^2k = ik = j \neq -j = j(jk)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
![]()
|
||||
|
||||
![]()
|
||||
|
||||
|
||||
### Hybrid Complex
|
||||
|
||||
A very bad multiplication scheme, made to violate a couple of rules that I established in the initial specification for *M*. i is still a fourth root of unity, but co-products of it and the other terms are 0. Products of j and k lead back to the real and imaginary axes.
|
||||
|
||||
$$
|
||||
\begin{gather*}
|
||||
i^2 = -1,~ j^2 = k^2 = i,~ ijk = i \\
|
||||
M = \begin{pmatrix}
|
||||
-1 & 0 & 0 \\
|
||||
0 & i & 1 \\
|
||||
0 & 1 & -i
|
||||
\end{pmatrix},~ |M| = -(-i^2 - 1) = 0 \\
|
||||
i^2j = -j \neq 0 = i(ij)
|
||||
\end{gather*}
|
||||
$$
|
||||
|
||||
|
||||
Summary and Closing
|
||||
-------------------
|
||||
|
||||
In 4D, the interplay between the complex and split-complex sets deepens. For good choices in the behavior of *i*, *j*, and *k*, the main cardioid as well as the $L^1$ circle turn up rather harmoniously. In 3D, certain multiplications had sets which appeared to be solids of revolution of the 2D set, but surrounded by artifacts eliminated at various iteration counts. Despite similar shapes appearing, no such artifacting is apparent in 4D.
|
||||
|
||||
Unfortunately, the strategy I used to visualize 4D misses out on behavior specific to the fourth dimension. A more natural practice would be to show an explorable space spanning *ijk* with an additional slider that controls the real coordinate. For each value on the slider, we need to generate the set on a volume of sample points, which are then reduced to surfaces using 3D edge detection. In real-time, this has obvious drawbacks, as a single iteration on $51^3$ points takes a substantial amount of time, despite using a somewhat large step size of 0.02 . Even with all this effort, it can be difficult to see the slices which produce the videos, and the surface grows rougher with more iterations.
|
||||
|
||||
In higher dimensions, any three imaginary units can form an anticommutative triple. We can also form bigger *M*s by adjoining smaller ones. Most importantly, visualizations get more difficult. The "best" generalizations after quaternions are the octonions in 8D and sedonions in 16D, each of which lose important features like associativity. It should follow that more bizarre properties need to be defined to combat this complexity, but doing so is difficult when there are so many objects in the algebra. As long as the multiplication obeys at least partially basic properties, the shape of the set is rather predictible, if fractal.
|
||||
Loading…
x
Reference in New Issue
Block a user