Julia set: z₀=pixel, c=dot (default)
Mandelbrot set: c=pixel, z₀=dot
This tool visualizes repeated applications of complex functions. You can explore the classic Mandelbrot and Julia sets, as well as create your own custom complex functions.
We define a complex-valued function f(z). We start out with an initial z-value z₀, repeatedly apply f(z), and color pixels based on where the sequence goes.
Enter GLSL code that returns a vec2 result. Your function should use the variables z and c which are both vec2 (complex numbers).
Available complex functions:
a + b (you can just use + for addition)csquare(z) : z²ccube(z) : z³cpow(z, n) : z^ncmul(a, b) : a * bcdiv(a, b) : a / bcsin(z), ccos(z)cexp(z), clog(z)There are two coloring modes:
By default, we have parameters z₀ and c. z₀ is special and controls the initial value of the sequence, and c is just a parameter of the function.
You can add additional custom parameters to use in your function.
p in your function)For each parameter, you can choose between two modes:
Example: If you create a parameter named "p", refer to it simply as p in your function:
return csquare(z) + cmul(c, p);