What are Julia Sets?
Julia sets are closely related to the Mandelbrot set but offer a different perspective on fractal geometry. Named after French mathematician Gaston Julia, these sets represent a family of fractals, each defined by a specific complex parameter.While the Mandelbrot set uses the formula z(n+1) = z(n)² + c where c varies and z starts at 0, Julia sets keep c constant and vary the starting value of z.
The Key Difference from Mandelbrot
The distinction is implemented in themandel_vs_julia function:
Understanding the Algorithm
For Julia sets:- The parameter
cis fixed to values you specify (julia_x, julia_y) - For each pixel,
zstarts at that pixel’s complex coordinate - The iteration
z = z² + cis applied repeatedly - The coloring depends on whether z escapes to infinity
The Mandelbrot set can be thought of as a “map” of all possible Julia sets. Each point in the Mandelbrot set corresponds to a connected Julia set, while points outside correspond to disconnected “dust” Julia sets.
The Two Parameters
Julia sets are defined by two real numbers that represent a complex parameter c = julia_x + julia_y*i:julia_x
The Real ComponentTypically ranges from -2.0 to +2.0Controls the horizontal aspect of the fractal’s structure
julia_y
The Imaginary ComponentTypically ranges from -2.0 to +2.0Controls the vertical aspect of the fractal’s structure
Running Julia Sets
To launch a Julia set, you must provide both parameters:Example Commands
Parameter Input
The parameters are parsed from command-line arguments:The
atoi_plus function handles floating-point parsing, so you can use decimal values like -0.7 or 0.27015.Exploring Different Julia Sets
Connected vs Disconnected Sets
Connected vs Disconnected Sets
Connected Julia Sets (c inside Mandelbrot)
- Form a single continuous shape
- Examples: c = -0.7 + 0.27015i, c = 0.285 + 0.01i
- Display intricate, organic patterns
- Break into isolated fragments (“Fatou dust”)
- Examples: c = 1.0 + 0.0i, c = -2.0 + 0.0i
- Create scattered, chaotic patterns
Symmetry Properties
Symmetry Properties
All Julia sets have rotational symmetry of 180 degrees around the origin.Some special cases:
- Real c values (julia_y = 0): bilateral symmetry across the x-axis
- Imaginary c values (julia_x = 0): bilateral symmetry across the y-axis
- c on the unit circle: may have additional rotational symmetries
Famous Julia Sets
Famous Julia Sets
Dendrite (c = i)
- Tree-like branching structure
- One of the most visually striking
- Named for its rabbit-like appearance
- Famous in fractal literature
- Dragon-shaped spiral arms
- Located near the Mandelbrot set’s “neck”
Rendering Characteristics
Rendering Characteristics
Like the Mandelbrot set, Julia sets are rendered using the escape-time algorithm with:
- escape_value: 4 (default)
- iterations_definition: 30 (default, adjustable with +/- keys)
- Color mapping: PSYCHEDELIC_LIME to PSYCHEDELIC_MINT gradient
- Points in the set: Rendered as WHITE
Visual Exploration Tips
How to find interesting parameters:
- Pick points near the Mandelbrot set’s boundary for connected Julia sets
- Points inside the main cardioid create simple circular patterns
- Points near the “neck” (around -0.75, 0i) create dramatic spirals
- Points on the boundary create the most intricate structures
Recommended Starting Points
Beginner-Friendly
Advanced Exploration
Mathematical Connection to Mandelbrot
The relationship between Mandelbrot and Julia sets is profound:Every point in the Mandelbrot set represents a Julia set parameter that produces a connected fractal. This makes the Mandelbrot set a “catalog” of all interesting Julia sets.
Interactive Exploration
Once launched, use the same controls as the Mandelbrot set:- Zoom in/out: Mouse scroll wheel
- Pan: Arrow keys or WASD
- Detail adjustment: +/- keys (modify iteration count)
- Exit: ESC key