-
Notifications
You must be signed in to change notification settings - Fork 59
User Formulas
Zoltán Kovács edited this page Jan 2, 2020
·
16 revisions
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
.
Available functions are listed below:
+, -, *, /, ^
- re(z) - real part of z
- im(z) - imaginary part of z
- 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
- log2(z), log10(z) - logarithm in base 2 and 10
- sqrt(z) - square root
- 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.
- 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.
- See https://github.com/malczak/sffe for more information.