sfXaoS is segfaultlabs' extended version of XaoS fractal zoom.
It's based on XaoS source code (ver 3.2.3). Extension to sfXaoS was made by adding SFFE formula evaluator to official version.
This gives us possibility to explore our own fractals.
sfXaoS uses our own formula evaluator library called SFFE. For complex number math this library uses our asm implementation of complex
number functions. But it can also use GSL complex math routines.
sfXaoS became base code for offical XaoS 3.3 release.
sfXaoS code has been also used in One Laptop per Child (OLPC) project,
and it is available on these laptops. OLPC association is developing a low-cost laptops available for children all around the world.
Features
Main sfXaoS features of current release (1.2.1) are:
-
Evaluation of user provided fractal definitions (formulas). In typed-in expression valid variables are :
- z - current sequance point Z(n)
- p - sequance point from iteration Z(n-1)
- c - current plane point
User can also define initialization of sequence, that is z0 value. In this case only c is a valid variable in expression.
To display user
fractal, select 'User defined' from Fractal>More fractals menu
-
User formulas can be passed from command line
'-formula [expression]' - fractal definition
'-forminit [expression]' - z0 value
-
User formulas can be typed-in during runtime.
-
Saving/loading fractal view, now handles also user functions. It makes easy to share and archive Your fractals.
Compilation
Precompile steps:
- download and instal GSL lib
- if not using GSL download NASM compiler and compile asm source. it can be found in
[xaosDir]/src/sffe/asm, where is also build script availble.
Compile steps:
- configure
- flag --with-sffe=no turns OFF support for user formulas (by default its YES)
- flag --with-gsl=no formula evaluator does not use GSL complex number math, tries to use our asm implementation (NASM compiler
nedded), by default this flag is yes.
- make
Tests
Release 1.2.1 tested (compiled with 100% success) with :
- gcc 4.1.2, Ubuntu 7.04 (Feisty Fawn) - works with both GSL/ASM support
- Windows (cygwin) - works with bothh GSL/ASM support
Release 1.2 tested (compiled with 100% success) with :
- gcc 4.1.2, Ubuntu 7.04 (Feisty Fawn) - works with both GSL/ASM support
- Windows (cygwin) - crashes :(
Release 1.1 tested (compiled with 100% success) with :
- gcc 4.1.2, Ubuntu 7.04 (Feisty Fawn) - works with both GSL/ASM support
Release 1.0.0 tested (compiled with 100% success) with :
- Gentoo - works with both GSL/ASM support
- Ubuntu 7.04 (Feisty Fawn) - works with both GSL/ASM support
- Windows (cygwin) - works with both GSL/ASM support
Running
To run sfXaoS with your own formula check the examples below :
- xaos -formula 'z^3+c' this will set user function set to "z to the power of 3"
- xaos -formula 'sin(z^3)^2+inv(c)' -forminit 'sin(c)' this will set the user function, and sequence starting point is set to "sine of
c"
Available functions
Complex number functions available in user formulas are listed below:
- basic operations - +,-,*,/
- basic trigonometry - sin,cos,tan,cot,asin,acos,atan,acot,sinh,cosh,tanh,coth
- exponential and logarithmic functions
- exp,log,log2,log10
- logN(base,z) - logarithm of base N (where N is integer)
- logCN(base,z) - logarithm of base CN ( where CN is complex )
-
- power functions
- powi(z,int) - power with integer exponent (fastest)
- powd(z,double) - power with real exponent
- powdc(z,z) - power with complex exponent
- pow - same as powd
square functions
- sqr - square
- sqrt - square root of complex number
- rtni(z,n,i) - i-th solution for n-th order root
other functions
- inv - inverse
- abs - absolute values
- re - real part
- im - imaginary part
- rand(max) - return random number in range [0,max)
Complex numbers are expected in format { Real; Imag }, inside brackets only numbers are valid, eg. {3;2} defines complex number 3*2i.By default functions accept one parameter, if not list of parameters has been written.
In ASM build functions with specified type of parameter (eg. powi) can be faster than their altenatives.
For example: powi(z;2)+c is much faster than powd(z;2)+c.
Download
As sfXaoS became base code for offical XaoS 3.3 release, its sources can be
obtained from XaoS sourceforge page.
sfXaoS is also available in our public svn at
svn.segfaultlabs.com/sfXaoS.
Code history
- 5.03.2008 : sfXaoS is now XaoS 3.3
- 24.02.2008 : 1.2.1 (stable)
- segmentation fault error
- memory leaks fixes
- sffe lib parser error
- 22.02.2008 : 1.2 (stable)
- Formula parser errors are now displayed in sfXaoS window
- The same set of complex number functions in both ASM/GSL build now available
- Render option bug fixed - now You can render animations with custom formulas
- Short help about using formula evaluator in sfXaos added
- some bugs have been fixed
- some minor changes
- 2.11.2007 : another public release
- sequence starting point can be defined (Fractal>User initialization)
- user formulas can be defined during runtime (Fractal>User formula)
- save/load supports now user functions
- new examples can be found in [xaosDir]/examples/Malczak
- 23.10.2007 : first public release
TODO
- add more user formula options (like: as symmetry)
- add new complex functions, and dynamically loaded functions support (function plugins)