Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Amazing Box, Amazing Surf and variations => Topic started by: CozyG on August 01, 2017, 12:11:16 PM




Title: 2D Mandelbox: Parameter Visualization
Post by: CozyG on August 01, 2017, 12:11:16 PM
I've been trying some ideas out using a 2D Mandelbox, for example in this thread about shape inversions (http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/generalized-shape-inversion-applied-to-the-mandelbox/). In the course of that work/play I've implemented a 2D Mandelbox in Fragmentarium that includes an overlay to visualize some of the parameters and behavior. It has become a valuable diagnostic and learning tool for me, so I thought I'd post the code on its own. Here's an image showing what it can do:

(http://www.genomancer.org/wp-content/uploads/2017/08/Mandelbox2D_ParamViz_All-2.00025.jpg)

This version of the 2D Mandelbox can show parameters in an overlay for the position of the boxfold (as light blue lines), the inversion radius (yellow circle outline), and the inversion minimum radius (red circle outline). The centers of the boxfold and the inversion are also modifiable parameters. The escape-time rendering can be toggled to grayscale and faded, to help highlight the parameter overlay.

The overlay can also show the orbit of a specified point within a single Mandelbox iteration.
Mandelbox iteration: p' = scale*spherefold(boxfold(p)) + offset

The transformed point is shown as small solid circles, for each step within the iteration:
     initial position => bright pink
     position after boxfold => light blue
     position after spherefold => yellow
     position after scaling => light orange
     position after offset => dark orange
This makes for educational animations if you smoothly change the initial position of the point :)

I am using this Mandelbox2D_ParamViz as a base for experiments, which makes it straightforward to add additional params to the overlay visualization. Frag files are attached.