Julia package for Fatou sets. Install using
Pkg.add("Fatou") in Julia. See Explore Fatou sets & Fractals in Wiki for detailed examples. This package provides:
orbit; along with various internal functionality using
Reduce and Julia expressions to help compute
Fatou.FilledSet efficiently. Full documentation is included. The
fatou function can be applied to a
Fatou.Define object to produce a
Fatou.FilledSet, which can then be passed as an argument to the
plot function of
PyPlot. Creation of
Fatou.Define objects is done via passing a
parse-able function expression string (in variables
c) and optional keyword arguments to
This package enables users of Julia lang to easily generate, explore, and share fractals of Julia, Mandelbrot, and Newton type. The name Fatou comes from the mathematician after whom the Fatou sets are named. Note that the Julia language is not named after the mathematician Julia after whom the Julia sets are named. This is a mere coincidence.
Definition (Julia set): For any holomorphic function on a complex plane, the boundary of the set of points whose result diverges when the function is iteratively evaluated at each point.
Definition (Fatou set): The Julia set’s complement is the set of fixed limit points from holomorphic recursion.
Definition (Mandelbrot set): The set of points on a complex parameter space for which the holomorphic recursion does not go to infinity from a common starting point
Definition (Newton fractal): The Julia/Fatou set obtained from the recursion of the Newton method
z↦z−m⋅f(z)/f′(z) applied to a holomorphic function.
The package has essentially two different plotting modes controlled by the
iter boolean keyword, which toggles whether to color the image by iteration count or whether to use a default (or custom) limit-value coloring function.
The number of Julia threads available is detected at the startup and is reported it back. When a specified Fatou set is computed, multi-threading is used to compute the pixels.
Since each pixel is independent of any other pixel, it doesn’t matter in what order or on how many threads it is computed, the more you use the faster it is.
The environment variable
JULIA_NUM_THREADS can be used to enable the multi-threading for more than 1 thread.
Please share your favorite fractals as
Fatou snippet in the discussion thread!
PyPlot.jl compatability features
The program can be initialized with
using Fatou, PyPlot or
A Fatou set is a collection of complex valued orbits of an iterated function. To help illustrate this, an additional feature is a plot function designed to visualize real-valued-orbits. The following is a cobweb orbit plot of a function:
juliafill(:(z^2-0.67),∂=[-1.25,1.5],x0=1.25,orbit=17,depth=3,n=147) |> orbit
plot it is simple to display a filled in Julia set:
c = -0.06 + 0.67im nf = juliafill(:(z^2+$c),∂=[-1.5,1.5,-1,1],N=80,n=1501,cmap="gnuplot",iter=true) plot(fatou(nf), bare=true)
It is also possible to switch to
mandelbrot(:(z^2+c),n=800,N=20,∂=[-1.91,0.51,-1.21,1.21],cmap="gist_earth") |> fatou |> plot
Fatou also provides
basin to display the the Newton / Fatou basins using set notation in LaTeX in
map(display,[basin(newton(:(z^3-1)),i) for i ∈ 1:3])
Compute the Newton fractal Julia set for a function with annotated plot of iteration count:
nf = newton(:(z^3-1),n=800,ϵ=0.1,N=25,iter=true,cmap="jet") nf |> fatou |> plot basin(nf,3)
Generalized Newton fractal example:
nf = newton(:(sin(z)-1),m=1-1im,∂=[-2π/3,-π/3,-π/6,π/6],n=500,N=33,iter=true,ϵ=0.05,cmap="cubehelix") nf |> fatou |> plot basin(nf,2)
using ImageInTerminal, the display of a
Fatou.FilledSet will be plotted automatically in the terminal.
orbit method also has optional
Additional plotting support can be added via Pull-Request by adding another
Requires script to the
__init__() function definition.
View Explore Fatou sets & Fractals in Wiki for detailed examples.
Troubleshooting on Julia 1.0.1+
Fatou is not compatible with Julia 1.0 but works on Julia 1.0.1 alright. Note that a stackoverflow error occurs on Julia 1.0.1+ when the
Reduce package is precompiled with
ENV["REDPRE"] flag set, therefore it is recommended to not set it.
If you encounter an unsatisfiable requirement in the package manager, an easy workaround is to use
dev Fatou instead of