# Flame

# 1 Flam3

Cosmic recursive fractal flames.

Upstream:

My modifications:

In my fork you can change line 40 or so of flam3.h and recompile, to change the precision of the iterates.

# 1.1 Bad Values

Replace

#define badvalue(x) (((x)!=(x))||((x)>1e10)||((x)<-1e10))

with

#define badvalue(x) (isnan(x)||isinf(x))
#undef EPS
#define EPS (0.0)

Do not enable -ffast-math or similar unsafe optimization.

The default constants cause rendering issues like holes with some parameters.

Actual issues of division by zero etc are probably rare.

# 1.2 Elliptic

I discussed some numerical issues at A more accurate elliptic variation.

It’s probably better to apply square root perturbation than mess around with Padé approximation:

double sqrt1pm1(double x)
{
  return x / (sqrt(x + 1) + 1);
}

Elliptic is similar to \[z \to \frac{2}{\pi} \sin^{-1}(z)\] but it’s not quite identical. The latter is conformal, so might be preferred.

# 2 Fractorium

Fractal flame editor with GPU support.

Upstream:

My modifications:

My fork mostly has uncontroversial changes to Debian packaging that should be mergable upstream.

To build a Debian package on Bookworm needs a /usr/bin/qmake that actually invokes /usr/bin/qmake6, I did it with a quick hack, not sure if there is any better way. Possibly newer debhelper has fixes to dh_auto_configure.

# 2.1 Raw Histogram

In my fork you can export raw histograms with a couple of additional command line flags:

  • --raw_histogram save raw histogram (EXR32 output mode only).
  • --raw_histogram_pre_density save raw histogram before density estimation.

# 3 Theory

Möbius Iterated Function Systems, Andrew Vince. Transactions of the American Mathematical Society, Volume 365, Number 1, January 2013, Pages 491–509, S 0002-9947(2012)05624-8 PDF (AMS)

Discusses IFS of Möbius transformations.