Fractal models: Arbitrary-precision implementations

Concrete implementations of the base class fractalshades.PerturbationFractal

class fractalshades.models.Perturbation_mandelbrot(directory: str)[source]
__init__(directory: str)[source]

An arbitrary precision power-2 Mandelbrot Fractal.

\[\begin{split}z_0 &= 0 \\ z_{n+1} &= z_{n}^2 + c\end{split}\]

This class implements arbitrary precision for the reference orbit, ball method period search, newton search, perturbation method, chained billinear approximations.

Parameters:
directorystr

Path for the working base directory

calc_std_div(*, calc_name: str, subset, max_iter: int, M_divergence: float, epsilon_stationnary: float, BLA_eps: float = 1e-06, interior_detect: bool = False, calc_dzndc: bool = True, calc_orbit: bool = False, backshift: int = 0)[source]

Perturbation iterations (arbitrary precision) for Mandelbrot standard set (power 2).

Parameters:
calc_namestr

The string identifier for this calculation

subset

A boolean array-like, where False no calculation is performed If None, all points are calculated. Defaults to None.

max_iterint

the maximum iteration number. If reached, the loop is exited with exit code “max_iter”.

M_divergencefloat

The diverging radius. If reached, the loop is exited with exit code “divergence”

epsilon_stationnaryfloat

Used only if interior_detect parameter is set to True A small criteria (typical range 0.01 to 0.001) used to detect earlier points belonging to a minibrot, based on dzndz1 value. If reached, the loop is exited with exit code “stationnary”

BLA_epsNone | float

Relative error criteriafor BiLinear Approximation (default: 1.e-6) if None BLA is not activated.

interior_detectbool

If True, activates interior points early detection. This will trigger the computation of an additionnal quantity (dzndz), so shall be activated only when a mini fills a significative part of the view.

calc_dzndc: bool

If True, activates the computation of an additionnal quantities (dzndc), used for distance estimation plots and for shading (normal map calculation)

calc_orbit: bool

If True, stores the value of an orbit point @ exit - backshift

backshift: int (> 0)

The number of iteration backward for the stored orbit starting point

class fractalshades.models.Perturbation_mandelbrot_N(directory: str, exponent: int)[source]
__init__(directory: str, exponent: int)[source]

An arbitrary precision power-N Mandelbrot Fractal.

\[\begin{split}z_0 &= 0 \\ z_{n+1} &= {z_{n}}^N + c\end{split}\]

This class implements arbitrary precision for the reference orbit, ball method period search, newton search, perturbation method, chained billinear approximations.

Parameters:
directorystr

Path for the working base directory

calc_std_div(*, calc_name: str, subset, max_iter: int, M_divergence: float, epsilon_stationnary: float, BLA_eps: float = 1e-06, interior_detect: bool = False, calc_dzndc: bool = True, calc_orbit: bool = False, backshift: int = 0)[source]

Perturbation iterations (arbitrary precision) for Mandelbrot standard set (power N).

Parameters:
calc_namestr

The string identifier for this calculation

subset: Optional `fractalshades.postproc.Fractal_array`

A boolean array-like, where False no calculation is performed If None, all points are calculated. Defaults to None.

max_iter: int

the maximum iteration number. If reached, the loop is exited with exit code “max_iter”.

M_divergence: float

The diverging radius. If reached, the loop is exited with exit code “divergence”

epsilon_stationnary: float

Used only if interior_detect parameter is set to True A small criteria (typical range 0.01 to 0.001) used to detect earlier points belonging to a minibrot, based on dzndz1 value. If reached, the loop is exited with exit code “stationnary”

BLA_eps: None | float

Relative error criteria for Bilinear Approximation (default: 1.e-6) if None BLA is not activated.

interior_detect: bool

If True, activates interior points early detection. This will trigger the computation of additionnal quantities (dzndz), so shall be activated only when a mini fills a significative part of the view.

calc_dzndc: bool

If True, activates the computation of an additionnal quantities (dzndc), used for distance estimation plots and for shading (normal map calculation)

calc_orbit: bool

If True, stores the value of an orbit point @ exit - backshift

backshift: int (> 0)

The number of iteration backward for the stored orbit starting point

class fractalshades.models.Perturbation_burning_ship(directory: str, flavor: ~typing.Literal[<enum 'BS_flavor_enum'>] = 'Burning ship')[source]
__init__(directory: str, flavor: ~typing.Literal[<enum 'BS_flavor_enum'>] = 'Burning ship')[source]

Arbitrary-precision class for the Burning ship and other “abs variations”.

The Burning Ship fractal, first described by Michael Michelitsch and Otto E. Rössler in 1992, is a variant of the mandelbrot fractal which involve the absolute value function, making the formula non-analytic:

\[\begin{split}x_0 &= 0 \\ y_0 &= 0 \\ x_{n+1} &= x_n^2 - y_n^2 + a \\ y_{n+1} &= 2 |x_n y_n| - b\end{split}\]

where:

\[\begin{split}z_n &= x_n + i y_n \\ c &= a + i b\end{split}\]

For a more comprehensive introduction, we recommend the paper At the Helm of the Burning Ship [HA19].

This class implements arbitrary precision for the reference orbit, ball method period search, newton search, perturbation method, chained billinear approximations.

Parameters:
directory: str

Path for the working base directory

flavor: str

The variant of Burning Ship detailed implementation, defaults to “Burning Ship”. Acceptable values and iteration formula are detailed in the notes of fractalshades.models.Burning_ship documentation.

calc_std_div(*, calc_name: str, subset, max_iter: int, M_divergence: float, BLA_eps: float = 1e-06, calc_hessian: bool = True, calc_orbit: bool = False, backshift: int = 0)[source]

Perturbation iterations (arbitrary precision) for this class.

Parameters:
calc_namestr

The string identifier for this calculation

subset

A boolean array-like, where False no calculation is performed If None, all points are calculated. Defaults to None.

max_iterint

the maximum iteration number. If reached, the loop is exited with exit code “max_iter”.

M_divergencefloat

The diverging radius. If reached, the loop is exited with exit code “divergence”

BLA_eps: float

Relative error criteria for BLA (default: 1.e-6) If None, BLA is not activated.

calc_hessian: bool

if True, the derivatives will be caculated allowing distance estimation and shading.

calc_orbit: bool

If True, stores the value of an orbit point @ exit - orbit_shift

backshift: int (> 0)

The count of iterations backward for the stored orbit starting point