Contents
Burning Ship fractal
The Burning Ship fractal, first described and created by Michael Michelitsch and Otto E. Rössler in 1992, is generated by iterating the function: in the complex plane \mathbb{C} which will either escape or remain bounded. The difference between this calculation and that for the Mandelbrot set is that the real and imaginary components are set to their respective absolute values before squaring at each iteration. The mapping is non-analytic because its real and imaginary parts do not obey the Cauchy–Riemann equations. Virtually all images of the Burning Ship fractal are reflected vertically for aesthetic purposes, and some are also reflected horizontally.
Implementation
The below pseudocode implementation hardcodes the complex operations for Z. Consider implementing complex number operations to allow for more dynamic and reusable code. for each pixel (x, y) on the screen, do: x := scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) y := scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) zx := x // zx represents the real part of z zy := y // zy represents the imaginary part of z iteration := 0 max_iteration := 100 while (zxzx + zyzy < 4 and iteration < max_iteration) do xtemp := zxzx - zyzy + x zy := abs(2zxzy) + y // abs returns the absolute value zx := xtemp iteration := iteration + 1 if iteration = max_iteration then // Belongs to the set return INSIDE_COLOR return (max_iteration / iteration) × color // Assign color to pixel outside the set
Gallery
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.