MRaster examples 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
apollony.cpp File Reference

Draw the Apollony Gasket via an ifs. More...

Go to the source code of this file.

Detailed Description

Draw the Apollony Gasket via an ifs.

Author
Mitch Richling https://www.mitchr.me
Keywords
apollony fractal gasket
Standards
C++20
See also
https://www.mitchr.me/SS/AGasket/index.html
Details

Pick an initial \(z\in\mathbb{C}\), say \(\frac{1}{10}+\frac{2}{10}i\). Then iterate. For each iteration let the next $z$ value be \(f_n(z)\) where \(n\) is selected at random. If we plot the \(z\) points, we obtain the classical Apollony Gasket.

\[\begin{array}{rcl} f_1(z) &=& f(z) \\ f_2(z) &=& \frac{-1 + i\sqrt{3}}{2f(z)} \\ f_3(z) &=& \frac{-1 - i\sqrt{3}}{2f(z)} \\ \end{array}\]

Where

\[ f(z) = \frac{3}{1-z+\sqrt{3}} - \frac{1+\sqrt{3}}{2+\sqrt{3}} \]

Definition in file apollony.cpp.