https://github.com/chakravala/fatou.jl

Fatou sets in Julia (Fractals, Newton basins, Mandelbrot)

https://github.com/chakravala/fatou.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

chaos complex-numbers fractal-algorithms fractal-images fractals julia-set julia-sets mandelbrot newton-fractals newtons-method nonlinear numerical-analysis recursion root-finding

Keywords from Contributors

theorem proof pdf-generation parallel ida tensor hybrid-differential-equations mathematics algebra jacobian
Last synced: 4 months ago · JSON representation ·

Repository

Fatou sets in Julia (Fractals, Newton basins, Mandelbrot)

Basic Info
Statistics
  • Stars: 115
  • Watchers: 6
  • Forks: 15
  • Open Issues: 3
  • Releases: 18
Topics
chaos complex-numbers fractal-algorithms fractal-images fractals julia-set julia-sets mandelbrot newton-fractals newtons-method nonlinear numerical-analysis recursion root-finding
Created over 8 years ago · Last pushed 4 months ago
Metadata Files
Readme License Citation

README.md

Fatou.jl

Build Status Build status Coverage Status codecov.io

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: fatou, juliafill, mandelbrot, newton, basin, plot, and 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 plot functions of Makie, PyPlot, ImageInTerminal. Creation of Fatou.Define objects is done via passing a parse-able function expression string (in variables z, c) and optional keyword arguments to juliafill, mandelbrot, and newton.

Background

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 z0.

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 with us your favorite fractals as Fatou code snippets!

Examples

Fatou.Define provides the following optional keyword arguments:

Julia Q::Expr = :(abs2(z)), # escape criterion, (z, c) -> Q C::Expr = :((angle(z)/(2π))*n^p)# coloring, (z, n=iter., p=exp.) -> C ∂ = π/2, # Array{Float64,1} # Bounds, [x(a),x(b),y(a),y(b)] n::Integer = 176, # vertical grid points N::Integer = 35, # max. iterations ϵ::Number = 4, # basin ϵ-Limit criterion iter::Bool = false, # toggle iteration mode p::Number = 0, # iteration color exponent newt::Bool = false, # toggle Newton mode m::Number = 0, # Newton multiplicity factor mandel::Bool= false, # toggle Mandelbrot mode seed::Number= 0.0+0.0im, # Mandelbrot seed value x0 = nothing, # orbit starting point orbit::Int = 0, # orbit cobweb depth depth::Int = 1, # depth of function composition cmap::String= "" # imshow color map

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 program can be initialized with using Fatou, PyPlot or Makie or ImageInTerminal. For PyPlot the imshow and plot methods can be used, while for Makie the heatmap, contour, surface, and arrows methods can be used.

When using ImageInTerminal, the display of a Fatou.FilledSet will be plotted automatically in the terminal. The orbit method also has optional UnicodePlots compatibility. Additional plotting support can be added via Pull-Request by adding another Requires script to the __init__() function definition.

The following is a cobweb orbit plot of a function:

Julia juliafill(:(z^2-0.67),∂=[-1.25,1.5],x0=1.25,orbit=17,depth=3,n=147) |> orbit

img/orbit.png

With fatou and plot it is simple to display a filled in Julia set:

Julia 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)

img/filled-julia.png

It is also possible to switch to mandelbrot mode:

Julia mandelbrot(:(z^2+c),n=800,N=20,∂=[-1.91,0.51,-1.21,1.21],cmap="gist_earth") |> fatou |> plot

img/mandelbrot.png

Fatou also provides basin to display the the Newton / Fatou basins using set notation in LaTeX in IJulia.

Julia map(display,[basin(newton(:(z^3-1)),i) for i ∈ 1:3])

D1(ϵ)

D2(ϵ)

D3(ϵ)

Compute the Newton fractal Julia set for a function with annotated plot of iteration count:

Julia nf = newton(:(z^3-1),n=800,ϵ=0.1,N=25,iter=true,cmap="jet") nf |> fatou |> plot basin(nf,3)

img/newton.png

Generalized Newton fractal example:

Julia 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)

img/generalized-newton.png

D2(ϵ)

View Explore Fatou sets & Fractals in Wiki for detailed examples.

Troubleshooting on Julia 1.0.1+

Note that 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 add Fatou.

Owner

  • Name: Dream Scatter
  • Login: chakravala
  • Kind: user

computational language algeber 🧐 abstract research mathematician

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Reed"
  given-names: "Michael"
  orcid: "https://orcid.org/0000-0002-8006-7816"
title: "Fatou.jl"
version: 1.2.1
doi: 10.5281/zenodo.10670459
date-released: 2024-02-16
url: "https://github.com/chakravala/Fatou.jl"

GitHub Events

Total
  • Create event: 1
  • Commit comment event: 3
  • Issues event: 2
  • Release event: 1
  • Watch event: 4
  • Issue comment event: 2
  • Push event: 3
Last Year
  • Create event: 1
  • Commit comment event: 3
  • Issues event: 2
  • Release event: 1
  • Watch event: 4
  • Issue comment event: 2
  • Push event: 3

Committers

Last synced: almost 2 years ago

All Time
  • Total Commits: 65
  • Total Committers: 4
  • Avg Commits per committer: 16.25
  • Development Distribution Score (DDS): 0.262
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Reed m****d@c****m 48
Michael Reed 1****a 15
Elliot Saba s****t@g****m 1
Tony Kelman t****y@k****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 10
  • Total pull requests: 4
  • Average time to close issues: 18 days
  • Average time to close pull requests: about 4 hours
  • Total issue authors: 8
  • Total pull request authors: 3
  • Average comments per issue: 2.4
  • Average comments per pull request: 3.25
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • attobot (2)
  • hammerfunctor (2)
  • wangzhiqing1993 (1)
  • mcditoos (1)
  • ryanrightmer (1)
  • randomwangran (1)
  • Liukangmk (1)
  • rabarar (1)
  • tomerarnon (1)
Pull Request Authors
  • chakravala (2)
  • tkelman (1)
  • staticfloat (1)
Top Labels
Issue Labels
bug (4) question (3) enhancement (1) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • julia 3 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
juliahub.com: Fatou

Fatou sets in Julia (Fractals, Newton basins, Mandelbrot)

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 3 Total
Rankings
Stargazers count: 7.3%
Forks count: 9.8%
Dependent repos count: 9.9%
Average: 16.5%
Dependent packages count: 38.9%
Last synced: 4 months ago