Barnsley's Tree

Author

Eric W. Weisstein
January 5, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Fractals/BarnsleysTree.nb.

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

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

Code

JuliaSet[maxits_:50,c_,rmax_:3.,{{x1_,x2_},{y1_,y2_}},opts___]:=DensityPlot[
Length[
FixedPointList[
c(#-Sign[Re[#]])&,
x+I y,
maxits,
SameTest->(Abs[#2]>rmax&)
]
],
{x,x1,x2},{y,y1,y2},
opts,
Mesh->False,
Frame->False,
AspectRatio->Automatic
]

Fractal

JuliaSet[50,.6+1.1I,2.33,{3{-1,1},2{-1,1}},ColorFunction->(Hue[2#]&),PlotPoints->Floor[100{3/2,1}]]//Timing

JuliaSet[50,.6+1.1I,2,{{-2.7,2.7},{-1.7,1.7}},ColorFunction->(Hue[2#]&),PlotPoints->Floor[500{2.7/1.7,1}]]//Timing

Mandelbrot2[{{x1_,x2_},{y1_,y2_}},r_:2,opts___]:=Module[{x,y},
Print[r];
DensityPlot[-Length[
FixedPointList[(#-Sign[Re[#]])/(x+I y)&,x+I y,50,SameTest->(Abs[#2]>r&)]],
{x,x1,x2},{y,y1,y2},
opts,
PlotPoints->200,
Mesh->False,
Frame->False,
AspectRatio->Automatic,
ColorFunction->Hue]
]

Mandelbrot3[{{x1_,x2_},{y1_,y2_}},r_:4,opts___]:=Module[{x,y},
Print[r];
DensityPlot[-Length[
FixedPointList[(#-Sign[Re[#]])/(x+I y)&,x+I y,50,SameTest->(Abs[#2]>r&)]],
{x,x1,x2},{y,y1,y2},
opts,
PlotPoints->200,
Mesh->False,
Frame->False,
AspectRatio->Automatic,
ColorFunction->Hue]
]

Mandelbrot2[{{.01,1},{.01,.75}},ColorFunction->(Hue[3#]&),PlotPoints->250]//Timing

Mandelbrot3[{{.01,1},{.01,.75}}]//Timing

??Mandelbrot2

Mandelbrot5[{{x1_, x2_}, {y1_, y2_}},r_:4,opts___] := 
    Module[{}, 
    Print[r];
    DensityPlot[-Length[FixedPointList[(#1 - Sign[Re[#1]])/(x + I*y) &, x + I*y, 1000, 
          SameTest -> (Abs[#2] > r & )]],
          {x, x1, x2}, {y, y1, y2}, opts, PlotPoints -> 200, Mesh -> False, 
       Frame -> False, AspectRatio -> Automatic, ColorFunction -> Hue]]

Mandelbrot5[{{.01,1},{.01,.75}},2]//Timing

Mandelbrot5[{{.01,1},{.01,.75}},6,ColorFunction->(Hue[5#]&)]//Timing

Mandelbrot5[{{.01,1},{.01,.75}},4,ColorFunction->(Hue[5#]&)]//Timing

Mandelbrot5[{{.01,1},{.01,.75}},4]//Timing

Mandelbrot2[{{x1_,x2_},{y1_,y2_}},opts___]:=Module[{},
Print["blah"];DensityPlot[-Length[FixedPointList[(#-Sign[Re[#]])/(x+I y)&,x+I y,500,SameTest->(Abs[#2]>4&)]],{x,x1,x2},{y,y1,y2},opts,PlotPoints->200,Mesh->False,Frame->False,AspectRatio->Automatic,ColorFunction->Hue]
]

Mandelbrot2[{{.4123,.4139},{.6208,.6223}},ColorFunction->(Hue[5#]&),PlotPoints->100]//Timing

Mandelbrot2[{{.4123,.4139},{.6208,.6223}},ColorFunction->(Hue[2#]&),PlotPoints->100]//Timing

V6

JuliaSet[50,.6+1.1I,2,{{-2.7,2.7},{-1.7,1.7}},ColorFunction->(Hue[1.5#]&)]

JuliaSet[50,.6+1.1I,2,{{-2.7,2.7},{-1.7,1.7}},ColorFunction->(Hue[1.5#]&),MaxRecursion->5]

JuliaSet[50,.6+1.1I,2,{{-2.7,2.7},{-1.7,1.7}},ColorFunction->(Hue[2#]&),MaxRecursion->5]

JuliaSet[50,.6+1.1I,2,{{-2.7,2.7},{-1.7,1.7}},ColorFunction->(Hue[3#]&),MaxRecursion->5]