Hopfbrot

Author

Eric W. Weisstein
August 30, 2026

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

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

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

Figure

Mathematica

The figure shows the z = 0 three-dimensional slice of a degree-2 Hopfbrot approximation obtained after five iterations with escape radius 2.

Module[{hopfbrotNorm,hopfbrotNormValue},hopfbrotNorm=Compile[{{x,_Real},{y,_Real},{w,_Real}},Module[{vector={0.,0.,0.,0.},parameter={x,y,0.,w},firstRadius,secondRadius,radius,firstAngle,secondAngle,hopfAngle},Do[firstRadius=(Sqrt[((vector[[1]])^2)+((vector[[2]])^2)]);secondRadius=(Sqrt[((vector[[3]])^2)+((vector[[4]])^2)]);radius=(Sqrt[vector.vector]);firstAngle=If[firstRadius==0,0.,ArcTan[vector[[1]],vector[[2]]]];secondAngle=If[secondRadius==0,0.,ArcTan[vector[[3]],vector[[4]]]];hopfAngle=If[radius==0,0.,ArcTan[firstRadius,secondRadius]];vector=(radius^2) {Cos[2 hopfAngle] Cos[2 firstAngle],Cos[2 hopfAngle] Sin[2 firstAngle],Sin[2 hopfAngle] Cos[2 secondAngle],Sin[2 hopfAngle] Sin[2 secondAngle]}+parameter,{5}];(Sqrt[vector.vector])],CompilationTarget->"C",RuntimeOptions->"Speed"];hopfbrotNormValue[x_?NumericQ,y_?NumericQ,w_?NumericQ]:=hopfbrotNorm[N[x],N[y],N[w]];RegionPlot3D[hopfbrotNormValue[x,y,w]≤2,{x,-2,0.85},{y,-1.25,1.25},{w,-1.1,1.1},Mesh->None,PlotPoints->60,MaxRecursion->1,ColorFunction->Function[{x,y,w},Blend[{,,,},w]],Axes->False,Boxed->False,Method->{"ShrinkWrap"->True}]]

Mathematica mesh + Blender rendering

The following Wolfram Language cells preserve the exact dense-mesh construction used during figure development. They define the same z = 0 degree-2 Hopfbrot approximation as above, with five iterations and escape radius 2, and generate a substantially denser triangulated surface using PlotPoints -> 480 and MaxRecursion -> 4. This computation is memory intensive.

denseIterationCount=5;denseEscapeRadius=2.;denseHopfbrotNorm=Compile[{{x,_Real},{y,_Real},{w,_Real}},Module[{vector={0.,0.,0.,0.},parameter={x,y,0.,w},firstRadius,secondRadius,radius,firstAngle,secondAngle,hopfAngle},Do[firstRadius=(Sqrt[((vector[[1]])^2)+((vector[[2]])^2)]);secondRadius=(Sqrt[((vector[[3]])^2)+((vector[[4]])^2)]);radius=(Sqrt[vector.vector]);firstAngle=If[firstRadius==0.,0.,ArcTan[vector[[1]],vector[[2]]]];secondAngle=If[secondRadius==0.,0.,ArcTan[vector[[3]],vector[[4]]]];hopfAngle=If[radius==0.,0.,ArcTan[firstRadius,secondRadius]];vector=(radius^2) {Cos[2 hopfAngle] Cos[2 firstAngle],Cos[2 hopfAngle] Sin[2 firstAngle],Sin[2 hopfAngle] Cos[2 secondAngle],Sin[2 hopfAngle] Sin[2 secondAngle]}+parameter,{denseIterationCount}];(Sqrt[vector.vector])],CompilationTarget->"C",RuntimeOptions->"Speed"];denseHopfbrotNormValue[x_?NumericQ,y_?NumericQ,w_?NumericQ]:=denseHopfbrotNorm[N[x],N[y],N[w]];

densePlot=RegionPlot3D[denseHopfbrotNormValue[x,y,w]≤denseEscapeRadius,{x,-2.,0.85},{y,-1.25,1.25},{w,-1.1,1.1},Mesh->None,PlotPoints->480,MaxRecursion->4,PerformanceGoal->"Quality",Axes->False,Boxed->False,Method->{"ShrinkWrap"->True}]

denseMesh=DiscretizeGraphics[densePlot]

Export[FileNameJoin[{NotebookDirectory[],"HopfbrotMesh.ply"}],denseMesh,"PLY"]

The published figure used a still denser sampled-field route. The same five-iteration norm was independently evaluated on a 1024 x 1024 x 1024 grid and encoded as a 16-bit scalar field. Blender 5.2.1 used OpenVDB to extract the zero isosurface. The convergence-supported central component contains 3,918,158 vertices and 7,837,568 triangles; 19,880 triangles in unstable detached extraction components were omitted. Blender Cycles rendered the surface with the notebook viewpoint and orthographic projection at 2000 x 2166 pixels using 256 adaptive samples, Metal GPU rendering, denoising, restrained studio lighting, and the blue-cyan-green-yellow color ramp for increasing fourth coordinate w. The color does not represent escape time.

When this notebook is opened in the MathWorld source tree, the following imports the published JPEG.

Import["/Volumes/Developer/Git/MathWorld/src/htdocs/images/gifs/Hopfbrot.png"]