Mandelshapes: Thinking Outside the Mandelbox
Year: 2019 Authors: Gregg Helt
Core claim
Radial reflection extends Mandelbox iteration to generate non-cubic Mandelshapes that mimic prescribed radial boundary shapes in 3D and 4D.
Topics
escape-time fractals, shape-controlled iteration, hypermandalas, 4D fractals
Domains
fractal geometry, iterative algorithms, higher-dimensional geometry, generative art, video art, visual design
Methods
radial reflection, Mandelbox iteration, shape inversion, 3D and 4D projection
Media
GLSL shader fragments, Fragmentarium, GitHub code
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2019 Conference Proceedings
Mandelshapes: Thinking Outside the Mandelbox
Gregg Helt
Genomancer, Healdsburg, CA, USA; gregghelt@gmail.com
Abstract
The Mandelbox is a recently discovered class of escape-time fractals that in its standard form has the overall shape of a cube. In this paper we introduce an extension to the Mandelbox iterative algorithm called radial reflection that allows extensive control of the overall shape of the resulting fractal. We then explore how this technique can be used to generate new 3D and 4D fractals, and their use for a particular artistic video style we call hypermandalas.
Mandelbox Fractals
The Mandelbox is a class of escape-time fractals which use a conditional combination of reflection, spherical inversion, scaling, translation, and rotation to transform points under iteration. It was first discovered by Tom Lowe in 2010 [5]. Figure 1 shows four different views of a typical 3D Mandelbox. The name is derived from its overall boxlike shape as shown in Figure 1a. Although it is difficult to make out details when looking at a small image of the whole fractal, views of the exterior at higher resolution as shown in Figure 1b reveal rich detail, as does the interior shown in Figure 1c. Figure 1d shows another useful visualization, a cutaway that slices the Mandelbox in half to reveal large scale internal structure.
(a)
(b)
(c)
Figure 1: Four different views of the same Mandelbox: (a) external view of entire Mandelbox, (b) exterior detail, (c) interior detail, (d) cutaway view of interior
(d)
Like the Mandelbrot set and other escape-time fractals, a Mandelbox set contains all the points whose orbits under iterative transformation by a function do not escape. For a basic Mandelbox the function to apply iteratively to each point is defined as a composition of transformations:
where Boxfold and Spherefold are conditional reflection and spherical inversion transforms, respectively. For more mathematical details see [4] or explore the many resources at the FractalForums online site [1].
Reshaping Mandelbox Fractals
In [4] we explored replacing the Mandelbox spherical inversion with a more generalized shape inversion. We observed that although this generated a rich diversity of localized fractal detail, no matter what shape we used for the conditional inversion the overall shape of the fractal remained a cube. This is a result of the conditional reflection around the sides of a cube in the Boxfold transformation. Motivated to create non-cubic Mandelbox fractals, we explored several existing options. The first is intersection, and we have
Helt
already shown an example of this technique in the Figure 1d cutaway. This works by only rendering parts of the fractal that intersect a given shape (a half-plane for the cutaway, or in Figure 2c a sphere and a half-plane). Another method is to apply a reverse pre-transform before the iterative loop. For example, a sphere-to-cube pre-transform will result in a spherical fractal. A sophisticated version of this technique is used in [6], where the transforms are computed using radial basis functions. But neither of the above methods change the iterative fractal calculations: they either simply discard parts (cutaways) or effectively spatially warp the original cubic fractal (pre-transforms). We also considered two powerful existing techniques that can yield different overall fractal shapes without cutaways or spatial warping, by modifying the Boxfold iterative transform. These are the generalized box fold [2] and conversion to Platonic dimensions (multidimensional barycentric coordinates) [8]. These two techniques are much closer to what we desired, however they both have requirements we would rather avoid. The generalized box fold requires finding the nearest point on a shape to the point under orbit with each iteration, whereas the Platonic dimensions approach is restricted to shapes that are intersections of sets of half planes (with each half plane defining one of the dimensions). But what we desire is an approach that can handle curved parametric shapes where there might not be a simple or efficient way to calculate nearest surface points.
However, we found a potential starting point in a specific technique proposed in [8] for creating a spherical Mandelbox (a Mandelsphere). This is done by treating the distance from the origin of each point iterated on as an additional dimension for Boxfold conditional reflection. For each point outside a sphere of radius centered on the origin, an additional point reflection is applied across the point of intersection I of the sphere with a ray from the origin to . We refer to this as radial reflection. The Spherefold conditional spherical inversion is modified in a similar manner. The result is shown in Figure 2a. At the scale of the whole Mandelbox, this result does not appear much different than using the intersection technique with a sphere, or applying a sphere-to-box pre-transform. But the differences become apparent if we slice the Mandelsphere in half and look more closely. Figure 2b shows a cutaway view of the center of the radial reflection Mandelsphere. For comparison Figure 2c shows the same view for a Mandelsphere created by intersection with a sphere, and Figure 2d shows the same view for a Mandelsphere created using a sphere-to-cube pre-transform, illustrating clear differences.
(a)
(b)
(c)
Figure 2: Different results from different ways of creating a Mandelsphere: (a) external view of radial reflection Mandelsphere, (b) radial reflection Mandelsphere cutaway center detail, (c) intersection Mandelsphere cutaway center detail, (d) pre-transform Mandelsphere cutaway center detail
(d)
Radial Intersect Reflection & 3D Mandelshapes
Inspired by the Mandelsphere, we hypothesized that if radial reflection across the radius of a sphere results in a sphere-shaped fractal, then radial reflection across the boundary of other shapes might result in non-cubic shapes as well. We have confirmed this and explored radial reflection using a number of shapes with parametric equations for the boundary distance from the origin for a given direction in spherical coordinates. Examples are shown in Figure 3 and 4. For various polyhedra and rounded polyhedra we used the extended superspheres (which we call polysuperspheres) described in [7].
Mandelshapes: Thinking Outside the Mandelbox
(a)
(a) cuboctahedron, (b) five-pointed concave supershape, (c) distorted spherical harmonic spaceship
(b)
(c)
Figure 3a shows the result of using a polysupersphere cuboctahedron for the radial reflection shape. We have also experimented with using supershapes, which are a generalization of superquadrics [3]. Figure 3b shows an example of using a supershape, in this case a five-pointed concave shape, demonstrating that the radial reflection shape does not need to be convex. Figure 3c further demonstrates that even concave shapes can produce fractals with overall structure that mimics the radial reflection shape, in this case a distorted spherical harmonic. We have also experimented with hybridizing the parametric equations for supershapes and polysuperspheres, creating a new parametric shape we call polysupershapes. Examples of fractals using different polysupershapes are shown in Figure 4.
(a)
(b)
(c)
Figure 4: Radial reflection Mandelshapes based on polysupershapes with different base polysupersphere shapes: (a) icosahedral, (b) octahedral, (c) cuboctahedral
4D Mandelshapes and Hypermandalas
Both the standard Mandelbox iterative algorithm and radial reflection generalize to any number of dimensions, as long as the boundary of the n-dimensional radial reflection shape can be found along a ray from iterated point to origin in hyperspherical coordinates. Therefore we have explored using 4D radial reflection to create 4D Mandelshapes. To expand the possibilities for radial reflection in 4D we also created a 4D version of the supershape, from the hyperspherical product of a 3D supershape and a 2D supershape. Although the possibility of creating higher dimensional supershapes has been suggested before [3], we are not aware of any previous published work on 4D supershapes.
Helt
We are utilizing these experiments to create art that we call hypermandalas, which are video pieces that navigate 4D Mandelshapes. Each video frame is the 2D projection of a 3D slice of the 4D fractal, with x,y,z held fixed throughout the piece while the camera travels along the fourth dimensional w axis. The focus is also kept on a central point, resulting in symmetric patterns that we find reminiscent of meditative mandalas, but evolving over time. Figure 5 shows still frames from several of these pieces.
(a)
(b)
(c)
Figure 5: Hypermandala still frames using radial reflection, based on different reflection shapes: (a) 4D blend of tesseract and hypersphere, (b) 4D supershape, (c) blend of 4D supershape and hypersphere
Summary and Conclusions
We generalized a prior technique for making a spherical Mandelbox, thus introducing radial reflection shapes to the Mandelbox algorithm. This allows the creation of new types of Mandelbox with different overall shapes (Mandelshapes) that mimic the radial reflection shapes. In addition we created new parametric shapes amenable to radial reflection, the 3D polysupershape and 4D supershape. Code for the work presented here is open source and available on GitHub. See genomancer.org for more information.
Acknowledgements
Techniques for this work were developed as GLSL shader fragments in Fragmentarium. Many thanks to all who contribute to Mandelbox development within the FractalForums online community [2].
References
[1] FractalForums, current site at http://fractalforums.org, archive at http://fractalforums.com. [2] fractower, “Generalized Box Fold”, 2011, http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/generalized-box-fold. [3] J. Gielis, B. Beirinckx, and E. Bastiaens, “Superquadrics with Rational and Irrational Symmetry.” ACM Symposium on Solid Modeling and Applications, New York, NY, USA, 2003, pp. 262-265. [4] G. Helt. “Extending Mandelbox Fractals with Shape Inversions.” Bridges Conference Proceedings, Stockholm, Sweden, Jul. 25-29, 2018, pp. 547-550. [5] T. Lowe, “Amazing Fractal,” 2010, http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/amazing-fractal. [6] T. McGraw and D. Herring, “Shape Modeling with Fractals.” Advances in Visual Computing, 2014, pp. 540–549. [7] S. Onaka, “Superspheres: Intermediate Shapes between Spheres and Polyhedra.” Symmetry, vol. 4, no. 3, pp. 336-343, Jul. 2012. [8] R. Perez, “Platonic Dimensions”, 2011, http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/platonic-dimensions.