Mandelbulb3D/Reference/Formulas/Formula types

Formula Types edit

Formula definitions in Mandelbulb3D fall into several different categories. Mandelbulb3D is a hybrid distance estimation renderer that can combine escapetime and IFS shapes in the same scene. The various categories of formulas can be browsed from the buttons directly below the formula tabs. Hover the cursor over a button such as 3D or 3Da to see a drop-down list of formulas in that category. Click a formula name to load it into the currently selected Formula tab, over-writing whatever is there.

Distance estimation edit

The rendering engine in Mandelbulb3D is special and different from traditional scanline and raytrace renderers. Mandelbulb3D uses distance estimation (DE) to optimize calculations of fractal formulas. It doesn't use mesh vertices or polygons.

Escapetime fractals edit

The primary distinction among formula definition types is between escapetime formulas and dIFS formulas. Escapetime is the method for generating Mandelbulbs, Mandelboxes, and other fractal objects. A formula is iterated by passing the initial point P0 to the formula, obtaining a new point P1, then passing P1 to the formula, obtaining P2, and so forth. The sequence of points P1, P2, P3, ... is called the orbit of P0. The calculation ends when either some point "escapes" by exceeding the bailout value or the orbit length reaches the Max. iterations value.

The length of the orbit before escaping is used to estimate the distance from the initial point to the fractal object. Points that are far from the object will escape quickly, and points that are near the object will take longer to escape. Points that are part of the object (called "inside" points) will not escape at all.

Analytic and non-analytic escapetime fractals edit

There are two types of escapetime fractals: analytic and non-analytic. Analytic DE formulas generally render faster. Mixing analytic formulas with non-analytic formulas results in a non-analytic calculation.

dIFS edit

In contrast to escapetime formulas, dIFS formulas implement shapes by directly computing the distance from a point to the shape. Iteration is not used to determine the distance, but the formulas are iterated and a distance computed for each iteration. The smallest distance for all the iterations is used as the distance from the point to the shape. The number of iterations is always the Max. iterations value, which should generally be small for dIFS formulas; the bailout value is not used.

Most dIFS formulas have a parameter "Apply scale+add"; if it is 1, the values of the Scale, Z add, Y add, and X add parameters are applied to the point when computing successive iterations. This results in the shape being repeated at different sizes and locations.

Note that dIFS formulas are not related to Iterated Function Systems, a method for generating fractals by iterating a formula most commonly seen in flame fractal programs, though some of the escapetime formulas use an escape time version of this (they have "IFS" in their names).

Transform edit

Both escapetime and dIFS shapes can be modified with transform formulas. Transform formulas do not generate any fractal objects, but apply various spatial functions to the associated Escapetime or dIFS formulas.

A Transform formula is applied to the formula immediately after it. A Transform formula in tab No. 1 will apply an effect to the formula in tab No. 2. For this reason, they are sometimes called pre-transform formulas.

With sufficient Iterations, the sequence of formula tabs repeats in a cycle. A Transform formula placed at the end of the tab sequence can modify the next iteration of the formula placed at the beginning of the tab sequence. This can make it appear that the Transform formulas' influence is bidirectional, but it is not. A transform affects the formula after it, whether that is on the current run of the sequence or the next one.

Transform formulas are written in Escapetime and dIFS varieties. An Escapetime Transform won't work on a dIFS shape, and a dIFS transform won't work on an Escapetime formula.

Formula buttons edit

Formulas are categorized according to their type: escapetime non-analytic, escapetime analytic, escapetime transform, dIFS shape, and dIFS transform.

3D edit

3D formulas are escapetime, non-analytic shapes.

3Da edit

3Da formulas are escapetime shapes with analytic DE based on an additional value, the W variable.

4D edit

4D formulas are escapetime non-analytic shapes, also using the W variable.

4Da edit

4Da formulas are escapetime analytic shapes, using another variable for the analytic calculation.

Ads edit

Ads formulas are escapetime transforms. No fractal object is generated. These formulas are identified by an underscore _ prefix at the beginning of the formula name.

Note: the naming and categorization conventions are not necessarily consistent. Some escapetime shape formulas also start with an underscore. Additional escapetime transforms may be found in the 3Da, 4D, and 4Da categories.

dIFS edit

The left and center buttons labeled dIFS give access to dIFS shapes. These are geometric forms generated in a more traditional parametric modeling method. Compared to escapetime formulas, dIFS can be very simple. But this simplicity is deceptive, because after many iterations, simple shapes can become fantastically complex. Most dIFS shapes have their own transforms built in. With the parameter Apply Scale + Add set to a value of one, successive iterations have the transform applied, making it possible to generate interesting, complex forms with one dIFS shape alone.

dIFS transforms edit

The far right button labeled dIFS gives access to dIFS transforms. Each applies some transformation to the dIFS shape following it in the formula tab sequence. No fractal object is generated. Some transforms are familiar, others are quite exotic and defy our rational understanding of the universe.

Customizing formula Lists edit

Right-click on any formula to see a context menu. This allows the user to re-order the formula list and hide formulas from the list.

To move the formula to the top of the list, choose Vote +.

To move the formula to the bottom, choose Vote -.

To restore the formula to default alphabetical order, choose Normal status for this formula.

To hide the formula, choose Hide this formula.

To unhide a formula, click the Hidden button below the formula list buttons. The Formulas panel displays a list of hidden formulas. Right-click a formula in the list to give it normal status, or an up or down vote.

See Also edit