Burning Ship Fractal

Author

Eric W. Weisstein
August 30, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/Fractals/BurningShipFractal.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/BurningShipFractal.html.

Copyright 2026 Wolfram Research, Inc. except for portions noted otherwise

Figure

Escape-time rendering of the Burning Ship fractal. The image is reflected vertically to give the conventional ship-like orientation.

Module[{burningShipData,data,width=1000,height=750,maxIterations=100},burningShipData=Compile[{{imageWidth,_Integer},{imageHeight,_Integer},{iterationLimit,_Integer}},Module[{values=ConstantArray[0.,{imageHeight,imageWidth}],cx,cy,zr,zi,nextReal,k,magnitudeSquared},Do[cy=-2.+((3. (j-1.))/(imageHeight-1.));Do[cx=-2.5+((4. (i-1.))/(imageWidth-1.));zr=0.;zi=0.;k=0;magnitudeSquared=0.;While[k<iterationLimit&&magnitudeSquared≤16.,nextReal=zr zr-zi zi+cx;zi=2. Abs[zr zi]+cy;zr=nextReal;magnitudeSquared=zr zr+zi zi;k++];values[[j,i]]=If[k==iterationLimit,1.,(k/iterationLimit)],{i,imageWidth}],{j,imageHeight}];values],CompilationTarget->"C",RuntimeOptions->"Speed"];data=burningShipData[width,height,maxIterations];ArrayPlot[Reverse[data],ColorFunction->Function[value,Blend[{White,,Orange,Red,Black},Clip[2.5 (Sqrt[value]),{0.,1.}]]],ColorFunctionScaling->False,Frame->False]]