I also taken care to make it easily extensible for future versions of XaoS so I hope there will not be many incompatibilities between various XaoS versions.
The format is a simple set of commands executed sequentially. XaoS does not provide any variables/cycles as usual scripting languages do, but future extension to full-blown Scheme should be easy since the format uses Scheme-like syntax. The syntax of every command is:
(command_name
[param1]
[param2])
where parameters are optional and separated by whitespace (an arbitrary number of spaces, tabs and newlines). The parameters can have the following types:
123
)1.23E2
)'
. It is used to pass
various string constants like formula name ('mandel
)
Quote is required for scheme compatibility#t
for true or #f
for falseThere is a complete description of all XaoS functions (with some examples) and an index of functions in the XaoS registry. You may particularly want to read about the animation functions. Also, the following functions are significant:
#include
in C.Example:
;configure everything for the first frame
(inistate)
(palette 1 1163254293 0) ;custom palette
(cycling #t) ;enable cycling
(cyclingspeed 7)
(maxiter 276) ;higher number of iterations
(range 3) ;default range for solid guessing
(usleep 1000000) ;second frame starts here
(moveview -1.8101154154614007889 -8.2687205907162041209E-05)
;just move the image
(usleep 1000000) ;third frame
(morphview -1.8101154154614007889 -8.2687205907162041209E-05
6.277210971069452361E-10 6.2772109785334669875E-10)
;10 seconds of zooming into selected
rectangle
(usleep 100000000)
The best way to learn XaoS command language is probably to read position files and modify them. For example, to create zooming animation from the original file:
(initstate)
(defaultpalette 0)
(formula 'mandel)
(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
Just change the view
command to
morphview
, and add usleep
:
(initstate)
(defaultpalette 0)
(formula 'mandel)
(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
(usleep 10000000)
The following code produces Julia morphing in the real axis:
(initstate)
(fastjulia #t)
(juliaseed -2 0)
(morphjulia 2 0)
(usleep 2000000)
And following is the "rotozooming" animation:
(initstate)
(fastrotate #t)
(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
(morphangle 300)
(usleep 10000000)
(wait)
(fastrotate #f)