-
Notifications
You must be signed in to change notification settings - Fork 59
User Formulas
XaoS supports entering your own custom formulas.
Select User formula from the Fractal menu to define a custom fractal formula.
Select User initialization to change the sequence starting point z0. By default z0 is set to 0.
User formulas should be interpreted as functions in the form Z(n+1) = formula (Z(n), Z(n-1), C).
In user formulas, as shown above, three variables are available:
variable | meaning |
---|---|
z | current sequence point Z(n) |
c | current plane 'point' |
p | previous sequence point Z(n-1) |
Format for complex numbers is {re;im}
, e.g. {3;2}
is complex number 3+2i. You must write constants for the coordinates. If you need to express a complex number with a non-constant, split it to real and imaginary parts like this: (re(z)+im(z)*{0;1})^2+c
.
Note that you need to use a semicolon. Also, parameters in functions must be separated by semicolons (see below).
Available functions are listed below:
+, -, *, /, ^
- re(z) - real part of z
- im(z) - imaginary part of z
- powI(z;n) - power of z with integer exponent n (fastest)
- powD(z;n) - power of z with real exponent n
- powDC(z;n) - power of z with complex exponent n
- pow(z;n) - same as powd(z;n)
The symbol
^
can also be used (see above) without explicitly defining the number set for the exponent.
- sin(z), cos(z), tan(z), cot(z), asin(z), acos(z), atan(z), acot(z), sinh(z), cosh(z), tanh(z), coth(z) can be used for computing trigonometrical functions
- exp(z), log(z) - exponential and natural logarithm of z
- log2(z), log10(z) - logarithm of z in base 2 and 10
- logN(n;z) - logarithm of z in base n (where n is integer)
- logCN(c;z) - logarithm of z in base c (where c is complex)
- sqrt(z) - square root of z
- rand(max) - random real number in range [0, max)
- abs(z) - absolute value of z
-
z^2+c
,z^3+c
, ... produce the quadratic and cubic Mandelbrot sets.z^2.5+c
produces another fractal "between them". -
(re(z)+im(z)*{0;1})^2+c
also produces the quadratic Mandelbrot set. -
powd(z;2)+c
creates the quadratic Mandelbrot set. A minor change in the formula, by usingpowDC(z;{2;0.1})+c
is equivalent toz^{2;0.1}+c
.
- The entered formula will always be rewritten in capitalized letters.
- Handling user formulas is still in experimental phase. Please expect random crashes or malfunctioning in some cases.
- Fast computation of user formulas is based on Mateusz Malczak's SFFE library.