GNU Info

Info Node: (xaos.info)format

(xaos.info)format


Prev: User Up: User
Enter node , (file) or (file)node

XaoS's file format description?
===============================

   This section describes format used by XaoS for animations,
confiugration files and saved possitions. All these files have common
format, designed to be easily readable, to allow manual editing of
files and converting them into another program.

   I also taken a care to make it easily extensible for future versions
of XaoS so I hope there will not be many incompatibilities between
various XaoS's versions.

   File is simple set of commands executed seqentially. XaoS does not
provide any varibles/cycles as usual scrippting languages but possible
future extension to scheme should be easy since format uses scheme-like
syntax.  Syntax of every command is:

     (command_name <PARAM1> <PARAM2>...)

   Where parameters are optional and separated by whitespace (arbitary
number of spaces, tabs and enters). Parameters should have following
types:

`integer'
     number w/o decimal point (`123')

`float'
     floating point number in decimal notation with optional exponent
     (`1.23E2')

`keyword'
     text started by apostroph `''. It is used to pass various string
     constants like formula name (`'mandel') Apostroph is required for
     scheme compatibility

`string'
     Text inside double quotes. The only parameter that should contain
     whitespaces

`boolean'
     `#t' for true or `#f' for false

   XaoS supports following functions: (functions with * invokes
recaluclation)

Control functions:
------------------

   XaoS command language lacks any control contstructions like loops,
if etc, since it is expected that scheme interpreter will be used in
case such thinks will be required.

 - Function: (LOAD STRING)
     This function loads and interprets file. It works in similiar way
     as include in C.

 - Function: (INITSTATE)
     This function reset XaoS state to default values from version 3.0.
     This command should be at the beggining of each animation file,
     since otherwise some stuff previously enabled by user should make
     inexpected effects.  State is not reseted by default before
     playing animation since it should make impossible to write macros.
     Current version IMO don't need them, but in future versions, where
     scheme programming language will be available this should be much
     more interesting subject.

Timming functions:
------------------

   This functions control animation replay speed.

 - Function: (USLEEP INTEGER)
     This function waits selected amount of time(in usec) until next
     commands are processed. Screen is recalculated and displayed at
     the begining of usleep when some (*) command were procesed in the
     last frame. Remaining time is spent by waiting or performing
     animation you entered by animation commands(see later)

 - Function: (WAIT)
     Waits until screen is animated (fractal is in calculation or some
     filters -- like motionblur does some animation. Do not call this
     function when zoom, or continuous rotation is active otherwise
     deadlock happends. It is recomended to call it, before text
     subtitles are displayed, since it looks ugly when they are
     displayed over blocky unfinished fractal. It may look well for you
     but ugly for others. Also you should call it after animation is
     performed and before switch to another fractal happeds, since
     switch to fractal involves calculation, screen is stopped for a
     while and unfinished fractal there looks ugly. You should also
     call it, when you want to do something as soon as possible.

 - Function: (TEXTSLEEP)
     This function is similiar to usleep, but should be used after text
     subtitle is displayed. Time to sleep is calculated from number of
     letters displayed and letters per second value. Letters per second
     value should be adjusted by users, so this provides mechanizm for
     finetuning speed of subtitles.


Fractal context functions:
--------------------------

   Fractal context contain informations about current fractal such as
formula, coloring modes etc.

 - Function: (FORMULA KEYWORD) (*)
     parameter keyword specifies formula you want to use. Following
     keywords are supported:mand, mand4, mand5, mand6, octo, newton,
     phoenix and newton The formula is switched and some other fractal
     context variables are switched to selected formula's defaults:
     julia/mandelbrot mode, current view.  Command works in same way as
     number key in ugly interface.

 - Function: (JULIA BOOLEAN) (*)
     Selects whether julia or mandelbrot version of fractal will be
     caluclated

 - Function: (JULIASEED FLOAT FLOAT) (* ONLY WHEN FAST JULIA MODE IS
          OFF)
     Selects julia seed (real and imaginary part)

 - Function: (PERTURBATION FLOAT FLOAT) (*)
     Selects perturbation value for mandelbrot version of set

 - Function: (PLANE INTEGER) (*)
     Selects plane number (same as in ugly interfact minus 1--starts
     with zero) I choosed numbering of planes instead of names because
     I was unable to find some nice, short and descriptive names for
     them.

 - Function: (INCOLORING INTEGER) (*)
     Selects inside coloring mode. Number works in same way as in plane
     command

 - Function: (OUTCOLORING INTEGER) (*)
     Same as incoloring but for outside coloring modes

 - Function: (INTCOLORING INTEGER) (*)
     Selects truecolor inside coloring mode. Number works in same way
     as in plane command. Has effect just wjem outcoloring mode is set
     to 10 (truecolor coloring)

 - Function: (OUTTCOLORING INTEGER) (*)
     Same as intcoloring but for outside coloring modes

 - Function: (MAXITER INTEGER) (*)
     Sets maximal number of iterations

 - Function: (RANGE INTEGER)
     Sets solid guessing range i.e how large rectangles will be filled
     by solid color when all four coners has same color.  0 disables
     this feature (increases precisity and slowes down)

 - Function: (PERIODICITY BOOLEAN)
     Enables/disables periodicity checking

Viewport functions:
-------------------

   Current viewport is part of fractal context, but I describe it here
separately to simplify orientation in this document. XaoS uses 4 numbers
to specify viewport--first two are real and imaginary coordinate of
center of view and next two are real and imaginary ranges. I decided to
use both ranges instead of "rectangular" view to allow specify viewport
more exactly to make animation nice even in unusual window dimensions.
Of course you should use both numbers equal. Viewport is before
calculation scalled according to current window dimension and smalles
possible viewport where image is correct(i.e not too wide/shrink)
containing whole selected viewport is displayed. So you should expect a
bit more stuff on the screen than you choosed.

 - Function: (ANGLE FLOAT) (* - JUST WHEN FASTROTATE MODE IS DISABLED)
     Set rotation angle in degrees

 - Function: (VIEW FLOAT FLOAT FLOAT FLOAT) (*)
     This function simply sets viewport.

 - Function: (ANIMATEVIEW FLOAT FLOAT FLOAT FLOAT) (*)
     This function is very similiar to previous one, except that it is
     expected that view will be changes just slightly so recaluclation
     with just ANIMATE priority (see fastmode command) is performed.

 - Function: (MOVEVIEW FLOAT FLOAT)
     This is animation function. For whole time selected by usleep after
     this frame will be spent by moving smoothly center of viewport to
     selected one

 - Function: (MORPHVIEW FLOAT FLOAT FLOAT FLOAT)
     This function is similiar to previous one except it allows also
     zooming/unzooming

 - Function: (FASTROTATE BOOLEAN)
     Enables/disables fast rotation mode. When fast rotation mode is on,
     XaoS is slower, but changing of angle does not require
     recaluclation.

 - Function: (MORPHANGLE FLOAT)
     This function smoothle morphes current angle to new one. Parameter
     is in degrees. Requires fastrotation mode enabled

 - Function: (AUTOROTATE BOOLEAN)
     Enables automatical continous rotation. Works just when fastrotate
     mode is enabled.

 - Function: (ROTATIONSPEED FLOAT)
     Adjust rotation speed. Parameter is in degrees per second.

 - Function: (ZOOMCENTER FLOAT FLOAT)
     This function sets center where you want to zoom/unzoom (where you
     pointed mouse in ugly interface). Parameters are not screen
     coordinates but coordinates in the fractal.

 - Function: (ZOOM)
     Starts zooing to point choosed by zoomcenter. This works in same
     way as button1 in the ugly interface. I don't recommend using this
     in manualy done scripts since it is not easy to expect result and
     result should differ slightly at different platforms/framerates.
     After zooming stops it is recommended use animateview to fix this
     possible error.  In manually writeln scripts I expect Zooming is
     performed until stop command is executed.

 - Function: (UNZOOM)
     Like zoom but starts unzooming

 - Function: (STOP)
     Stops zooming/unzoming (not imediately but after short time
     required for slowdown)

 - Function: (MAXSTEP FLOAT)
     Selects speed of zooming/unzooming. Step specifies how large
     amount of range will be taken away each 1/20 of second.  (0 means
     nothing, 1 means everything - this value is incorrect) Higher
     values means faster zooming

 - Function: (SPEEDUP FLOAT)
     When zooming/unzoming every 1/20 of second the speedup value is
     added to current step until maxstep is reeached. So this value
     selects speedup/slowdown of animation. Both this functions are
     more for internal use of XaoS then for manually wrote scripts.

Fast julia mode functions:
--------------------------

   Julia seed should be changed also using normal juliaseed function

 - Function: (FASTJULIA BOOLEAN) (* - JUST WITH #F)
     Enables/disables fast julia mode.

 - Function: (MORPHJULIA FLOAT FLOAT)
     Morphes seed from current one into new one linerary.

User interface functions:
-------------------------

 - Function: (FASTMODE KEYWORD)
     Image should be recalculated in two modes - fast mode, when after
     fixed amount of time caluclation is stopped and displayed with
     possibly lowered resolution and then resolution is slowly improved.
     Normal mode recaluclates image and displays it when finished. It
     also stops timming, so time spent by calclatig of image should
     differ in replay. (and next frames will not be replayed
     faster/slower to "get in time")

     By default new images are caluclated using normal mode but
     animation is caluclated using fast mode. You can change this
     behaviour by specifying:

    `never'
          Fast mode will be disabled

    `animation'
          The default behaviour

    `new'
          Use fast mode even for new images

 - Function: (FILTER KEYWORD BOOLEAN)
     Enables/disables selected filter. Keyword select filter and shoud
     be one of the following:
    `blur'
          motion blur filter

    `stereogram'
          random dot stereogram

    `interlace'
          interlace filter

    `truecolor'
          Truecolor emulator (recommended to enable in case your images
          rely on truecolor, smooth grades or palette size)

    `edge'
          wide edge detectio filter

    `edge2'
          Narrow edge detection filter

Palette functions
-----------------

   XaoS has small problems with restoring of palette. I had two goals in
save/replay mechanizm - to replay animations as exactly as possible and
to replay animation in highest possible quality (even higher then when
they was recorded). This two goals can not be solved in following
situation: XaoS uses palette as large as possible(approx 250 in 8bpp,
65536 in truecolor etc...). So when palette is saved in truecolor mode
and replayed in 8bpp it has to be shorter and when it is saved in 8bpp
and replayed in 65536 it is bigger. So do not rely on palette much.
First 200 entries should be OK but later ones should be different.
Another problem is color cycling.  Since on slower computers image
recaluclation takes longer time and color cycling is asymchronous
process, replay can not be exact.  So after you stop cycling, palette
should be shifted differently than when recorded. Please DO NOT RELY ON
ROTATED PALETTES.

   Following functions are provided:

 - Function: (DEFAULTPALETTE INTEGER) (* -- DO NOT RECALUCLATE IN MOST
          OF 8BPP MODES)
     Sets the default palette. The parameter says how much is palette
     shifted (by preious cycling). Should be 0 in the most cases.

 - Function: (PALETTE INTEGER INTEGER INTEGER)
     Generates random palette. First number specifies algorithm. It
     should be usefull for possible future improvements and must be 1
     for now.  Next parameter is random seed for palette. And the last
     one specifies shift like in (defaultpalette)

 - Function: (CYCLING BOOLEAN)
     Enables/disables color cycling. Note that on devices, where color
     cycling is impossible this command is ignored.

 - Function: (CYCLINGSPEED INTEGER)
     Sets cycling speed(how many shifts per second). Numbers lower than
     zero inverses direction of cycling

Text output functions
---------------------

   To make possible writting of commented tutorials XaoS has simple
text output functions too.

 - Function: (TEXT STRING)
     Displays text to the screen

 - Function: (TEXTPOSSITION HORIZONTAL VERTICAL)
     Lets you specify possition of displayed text. You may choose from 9
     possitions. HORIZONTAL parameter should be one of following
     keywords: `'left', `'center', `'right' and VERTICAL: `'top',
     `'middle', `'bottom'

 - Function: (MESSAGE STRING)
     Works in same way as `text' but uses string as index to message
     catalog, so it should be used for translatable tutorials.

 - Function: (LETTERSPERSEC INTEGER)
     Lets you adjust letters per second value used by textsleep. This
     is not recomended to use from animation since it should be best to
     let user tune it for himself. This function should be used in
     configuration file.

 - Function: (CLEARSCREEN)
     Clears screen...

 - Function: (DISPLAY)
     Displays fractal again. After text is displayed (or screen
     cleared), screen is not updated anymore to prevent overwriting of
     text. This is keept for compatibility with future version, where
     movement under text subtitles should be possible. You need to call
     `(display)' when you want to draw fractals again. It should be
     also used to clear subtitles (it redisplays screen with fractal)

   Example:

     ;configure everything for the first frame
     (palette 1 1163254293 0)	;custom palette
     (filter 'stereogram #f)		;no filters
     (filter 'interlace #f)
     (filter 'blur #f)
     (formula 'mandel)		;mandelbrot set
     (fastmode 'animation)		;default fast mode
     (fastjulia #f)			;normal mode
     (cycling #t)			;enable cycling
     (cyclingspeed 7)
     (maxiter 276)			;higher number o fiterations
     (outcoloring 0)			;no in/out coloring/plane
     (incoloring 0)
     (range 3)			;default range for solid guessing
     (plane 0)
     (usleep 1000000)		;second frame start here
     (moveview -1.8101154154614007889 -8.2687205907162041209E-05)
     				;just move the image
     (usleep 1000000)		;thirt frame
     (morphview -1.8101154154614007889 -8.2687205907162041209E-05
                 6.277210971069452361E-10 6.2772109785334669875E-10)
     				;10 seconds of zooming into selected rectanlge
     (usleep 100000000)

XaoS galerry
------------

   I plan to make XaoS galerry of animations and possition files at
XaoS homepage so please send me all your nice animations and images you
created using XaoS to `hubicka@paru.cas.cz'


automatically generated by info2www version 1.2.2.9