-
Notifications
You must be signed in to change notification settings - Fork 59
Reference
All XaoS functions are referenced by a central function registry. The scripting language, menus, dialogs and command line options are built from this database. This section contains information about all functions available in this registry.
Many commonly-used functions in XaoS are accessible using keyboard shortcuts.
Unless noted, these shortcuts do not use any modifier keys such as ctrl
or alt
.
On a Mac, use the cmd
key instead of ctrl
when specified.
Key | Function |
---|---|
Ctrl+N |
new |
Ctrl+O |
open |
Ctrl+S |
save |
Ctrl+Q |
quit |
Ctrl+Z , u
|
undo last change |
Ctrl+Y |
redo last change |
f |
in-coloring mode |
c |
out-coloring mode |
e |
filter |
i |
plane |
d |
default palette |
p |
random palette |
y |
color cycling |
Y |
reverse color cycling |
m |
Mandelbrot mode |
b |
perturbation |
k |
periodicity checking |
j |
fast Julia mode |
o |
rotation |
a |
autopilot |
v |
hide messages |
F5 , r
|
recalculate |
ESC , z
|
interrupt |
/ |
status |
l |
mini-status |
! |
command |
F1 , h
|
help |
+ / -
|
shift color palette |
Up / Down
|
increase/decrease zoom speed |
Left / Right
|
increase/decrease iterations |
Left / Right
|
change cycling speed (while in color cycling mode) |
All functions are available from the menu, which may only be displayed when you move the mouse to the top of the screen/window.
This menu is usually displayed at the top of the screen or window. It contains all currently available submenus. During animation another menu is displayed--the Animation menu.
Syntax: (initstate)
This function resets most of XaoS's values to their defaults. It is useful when you get lost and want to start from the beginning. It should also be used as the first command of every animation file, to ensure that the file is always played with the same settings in effect.
Available as: menu item, command line option, command
Load a XaoS position file (*.xpf
).
See the format description for more information.
Available as: menu item, command line option
Syntax: (savepos file)
Save current state to a XaoS position file (*.xpf
). This file is
human-readable, and can easily be improved by hand after saving, or used as
a base for animations.
See the format description for more information.
Available as: menu item, command line option, command
Syntax: (record bool [ file ])
Toggle recording to a XaoS animation file (*.xaf
). This file is
human-readable, and can easily be improved by hand after recording.
See the format description for more information.
From the scripting language, (record #t)
enables recording, and
(record #f)
disables it.
Available as: menu item, command line option, command
Replay a XaoS animation file (.xaf
).
Available as: menu item, command line option
Syntax: (saveimg file)
Save current state to an image file. This file is in .png
(portable
network graphics) format, which can be read by many applications varying from
graphics programs all the way to Web browsers.
Available as: menu item, command line option, command
Render an animation to image files. See Encoding Videos for more information.
Available as: menu item,
Syntax: (loadexample)
Choose random .xpf
file from the examples
directory and
load it.
You might use it as the starting point for next exploration.
Available as: menu item, command line option, command
Syntax: (savecfg)
Save current configuration to ~/.xaosrc
(under Unix) or xaos.cfg
(under DOS and Windows). XaoS automatically reloads the configuration from this
file when it starts.
Available as: menu item, command line option, command
Syntax: (quit)
Quit XaoS.
Available as: menu item, command line option, command
A fairly ordinary Edit menu.
Undo last operation. `Last operation' is quite hard to define in XaoS (where changes are continuous), so it might be surprising. I hope it will do what you want.
Available as: menu item
Redo last undone operation. See undo.
Available as: menu item
Copy fractal to clipboard. This is a platform-dependent operation that may not have an analogue on your platform (e.g. there is no concept of a clipboard under aalib).
Available as: menu item
Paste fractal from clipboard. This is a platform-dependent operation that may not have an analogue on your platform (e.g. there is no concept of a clipboard under aalib).
Available as: menu item
This menu contains all functions related to fractal parameters and display; you can change things like the formula used, coloring modes, seeds and much else.
- Formulae
- More formulae
- User formula
- User initialization
- Incoloring mode
- Outcoloring mode
- True-color coloring modes
- Plane
- Palette
- Mandelbrot mode
- Fast Julia mode
- View
- Rotation
Syntax: (formula keyword)
Set the current fractal formula. See Fractal Types for more information about different fractals.
The following formulae are supported:
keyboard shortcut | keyword | description |
---|---|---|
1 |
'mandel |
Mandelbrot |
2 -5
|
'mandel3 - 'mandel6
|
Higher-powered Mandelbrot sets |
6 |
'newton |
Newton |
7 |
'newton4 |
Newton^4 |
8 |
'barnsley |
Barnsley |
9 |
'barnsley2 |
Barnsley's second fractal |
0 |
'barnsley3 |
Barnsley's third fractal |
SHIFT-A |
'octo |
Octo |
SHIFT-B |
'phoenix |
Phoenix |
SHIFT-C |
'magnet |
Magnet |
SHIFT-D |
'magnet2 |
Magnet2 |
SHIFT-E |
Triceratops | |
SHIFT-F |
Catseye | |
SHIFT-G |
Mandelbar | |
SHIFT-H |
Lambda | |
SHIFT-I |
Manowar | |
SHIFT-J |
Spider | |
SHIFT-K |
Sierpinski Gasket | |
SHIFT-L |
Sierpinski Carpet | |
SHIFT-M |
Koch Snowflake | |
SHIFT-N |
Spidron Hornflake | |
SHIFT-O |
Mandelbrot^9 | |
SHIFT-P |
Beryl | |
SHIFT-Q |
Golden Seirpenski | |
SHIFT-R |
Circle 7 | |
SHIFT-S |
Sym Barnsley | |
SHIFT-T |
User Defined |
Available as: command, menu item, command line option
Syntax: (userform string)
Sets the user-defined formula to render. See User Formulas for more information.
Available as: menu item, command line option, command
Syntax: (userformInit string)
Sets the initial value for a user-defined formula. See User Formulas for more information.
Available as: menu item, command line option, command
Syntax: (incoloring integer)
Areas inside the set are usually filled in black, but this is only a convention; you could color them in differently to make the fractal look more interesting. The only method available to make areas inside the set visible is to display the value of the latest orbit as the value of each pixel.
The tutorial on incoloring has more information and examples.
XaoS has many different ways to show that value. The cryptic names of the modes are mathematical formulae, where real means the real part of the latest orbit, and imag means the imaginary part. zmag uses the magnitude of the value. The Decomposition-like method uses the angle of the orbit. Also, truecolor incoloring modes are available, that display one value in each of the red, blue and green color planes (or, for some modes, in each of the hue, saturation and value planes).
In the scripting language, the incoloring mode is specified by one of the following integers:
value | meaning |
---|---|
0 | 0 (default) |
1 | zmag |
2 | Decomposition-like |
3 | real/imag |
4 | abs(abs(c)-abs(r)) |
5 | cos(mag) |
6 | mag*cos(real2) |
7 | sin(real2-imag2) |
8 | atan(real*imag*creal*cimag) |
9 | squares |
10 | Truecolor. To set exact parameters for truecolor coloring use the command. |
Available as: menu item, command line option, command
Syntax: (outcoloring integer)
Outcoloring modes are similar to incoloring modes, but indicate how to display the areas outside the set instead. As with incoloring modes, the value of the latest orbit can be used to determine the color of each pixel, but the default is to use the number of iterations needed for the value at that point to become recognisably divergent as the color.
The tutorial on outcoloring has more information and examples.
The cryptic names of the modes are mathematical formulae, where iter means the number of iterations required for the value to become recognisably divergent, real means the real part of the latest orbit, and imag means the imaginary part. binary decomposition uses a different color when the imaginary part of the orbit is lower than zero, and smooth attempts to remove stripes and discontinuities. Also, truecolor outcoloring modes are available, that display one value in each of the red, blue and green color planes (or, for some modes, in each of the hue, saturation and value planes).
In the scripting language, the outcoloring mode is specified by one of the following integers:
value | meaning |
---|---|
0 | iter (default) |
1 | iter+real |
2 | iter+imag |
3 | iter+real/imag |
4 | iter+real+imag+real/imag |
5 | binary decomposition |
6 | biomorphs |
7 | potential |
8 | color decomposition |
9 | smooth |
10 | True-color outcoloring mode. To set exact parameters for truecolor coloring use outtcoloring . |
Available as: menu item, command line option, command
Syntax: (intcoloring integer)
Syntax: (outtcoloring integer)
Truecolor coloring modes are similar to incolor and outcolor coloring modes; but instead of using a palette, they directly calculate the red, green and blue components of the color. This lets you display more parameters at once, and produces interesting and often attractive results. On 8bpp displays you need to enable the palette emulator filter first to see anything, amd the quality won't be so good, as far fewer colors are available per parameter.
The tutorial on truecolor coloring modes has more information and examples.
The cryptic names of the modes are always three mathematical formulae (one for each color component), where real means the real part of the latest orbit, and imag means the imaginary part.
To enable inside/outside truecolor coloring mode in the scripting language,
set incoloring
/outcoloring
value to 10 (truecolor coloring
mode) before (or after) calling intcoloring
or outtcoloring
.
In the scripting language, the coloring mode is specified by one of the following integers:
value | meaning |
---|---|
0 | black |
1 | re*im sin(re2) angle |
2 | sin(re) sin(im) sin(square) |
3 | hsv |
4 | hsv2 |
5 | cos(re^c) cos(im2) cos(square) |
6 | abs(re2) abs(im2) abs(square) |
7 | re*im re*re im*im |
8 | abs(im*cim) abs(re*cre) abs(re*cim) |
9 | abs(re*im-csqr) abs(re2-csqr) abs(im2-csqr) |
Available as: menu item, command line option, command
Syntax: (plane integer)
All fractals displayed by XaoS are functions with a complex parameter.
They can be be displayed in the normal complex plane where the x
coordinate is the real part of the number and the y
is imaginary;
but they can also be displayed differently. The tutorial about planes
has some examples.
The numbers are used to select a plane from the scripting language.
Number | Name | Description |
---|---|---|
0 | mu | normal mode. |
1 | 1/mu | Inversion: infinity goes to 0 and 0 goes to infinity. |
2 | 1/(mu+0.25) | Similar to inversion, but moves the center outside of the Mandelbrot set so that it looks parabolic. |
3 | lambda | Lambda plane. |
4 | 1/lambda | Inversion of lambda plane. |
5 | 1/lambda-1 | Inversion with moved center. |
6 | 1/(mu-1.40115) | A very interesting mode for the Mandelbrot set. It makes small things big, so you can browse the set's details easily. |
Available as: command line option, command
This menu contains functions to change the palette the fractal is displayed with.
Syntax: (defaultpalette number)
Create a default palette. In the scripting language, number
specifies
how much the palette is shifted by.
Note that changing the palette in truecolor modes forces recalculation of the whole screen. To avoid this, you can enable the palette emulation filter first.
Available as: menu item, command line option, command
Syntax: (randompalette)
Create a random palette. XaoS will automatically pick one of its palette-generation algorithms and create one.
Note that changing the palette in truecolor modes forces recalculation of the whole screen. To avoid this, you can enable the palette emulation filter first.
Available as: menu item, command line option, command
Syntax: (palette integer integer integer)
A custom palette lets you re-create some of the random palettes. The first value specifies the algorithm, which should currently be one of the following:
value | meaning |
---|---|
0 | Default palette |
1 | Black to color gradient |
2 | Black to color to white gradient |
3 | Cubistic-like algorithm. |
The seed specifies a random seed for the palette; different seeds generate different palettes. The last value is the amount by which the palette is shifted.
Note that changing the palette in the truecolor modes forces recalculation of the whole screen. To avoid this, you can enable the
- palette emulation filter first.
Available as: menu item, command line option, command
Syntax: (cycling bool)
Color cycling is an old and simple effect to animate fractals. The Mandelbrot set looks particularly nice when color-cycled. On truecolor displays, color cycling fails to initialize (since those displays don't have a palette). You can enable palette emulation filter to make it possible.
Available as: menu item, command line option, command
In the user interface, colors can also be cycled in the opposite direction with the Reversed color cycling function.
To control the cycling speed, you coan use arrow keys or the Color cycling speed function.
Available as: menu item
Syntax: (cyclingspeed integer)
The parameter specifies the number of skips per second. It can be negative to cycle in the opposite direction.
Available as: menu item, command line option, command
Syntax: (shiftpalette integer)
Shift palette by the specified number of cells. This can be used to tune the palette's position on the fractal. You can also use the Shift one forward and Shift one backward functions for fine-tuning. Note that shifted and rotated palettes could look different on different displays (because they may have different palette sizes).
Shifting the palette on truecolor displays causes a recalculation of the screen. To avoid this, you could use palette emulation filter.
Available as: menu item, command line option, command
Most fractals rendered by XaoS can be represented as Mandelbrot sets or Julias. Each point in the Mandelbrot set has its own Julia set. To learn more about this correspondence, see the tutorial on the Julia set.
This function switches between Mandelbrot and Julia representations. When switching to Julia, you need to set the seed--a point selected from the Mandelbrot set.
If you run this function from the menu, you are prompted for the Julia seed
as a number. Often, this can be clumsy, and it would be easier to specify a
point with the mouse pointer. If you hit the M
key instead of
using the menu, the current mouse position is used.
Good seedpoints lie at the boundaries of the Mandelbrot set; other seeds usually generate quite a boring fractal. You can also explore various seeds at high speed using the Fast Julia mode.
Not all fractals have Julias, but XaoS can generate fake Julia sets for those that do not, which use some Julia-like modification of the formula; so this function is currently usable for all fractal types.
Available as: menu item
Syntax: (julia bool)
This function is used to enable/disable julia mode in animation files.
Available as: command line option, command
Syntax: (juliaseed complex)
Select the current julia seed.
Available as: command line option, command
Syntax: (fastjulia bool)
By default, changing the seed for the Julia set requires recalculation of the image (which is quite slow). It's a nice effect to change the seed smoothly and show the Julia set morphing as the seed changes. XaoS has a special algorithm which can calculate such morphings in realtime. It is very inexact, but it is good enough for a fast preview.
If you want to select a good seedpoint, enable fast Julia mode and find a nice place by dragging with the first mouse button depressed; then change to the Julia mode to see the exact image.
Available as: menu item, command line option, command
Set your current viewpoint in the fractal. This function is useful when you have found some interesting coordinates somewhere (on a web page, perhaps) and you want to see that position in XaoS.
In the dialog you will be asked for the center, radius and angle of the image.
The center specifies the point which is displayed at the center of the screen. The radius is the radius of a circle around this point; XaoS will size the image so that this circle only just fits on the screen. The angle gives the rotation of the image in degrees.
People specify fractal coordinates in many ways. Some people use the coordinates of the upper-left and lower-right visible points, specifying the coordinates as four numbers x1, y1, x2, y2. To set the same viewpoint in XaoS, set the real portion of the center to (x1+x2)/2, the imaginary part of center to (y1+y2)/2, and the radius to the greater of x2-x1 and y2-y1.
Other programs use a zoom factor instead of a radius. For these, you can set the radius to 2/zoom.
Available as: menu item
Syntax: (view float float float float)
This function is used to set the visible area of fractal in animation files.
It doesn't let let you specify the angle, (for that, see the separate function
angle
), but lets you specify an ellipse instead of a circle. You can
specify both a real and an imaginary radius, so you have better control over the
area that will be visible. XaoS will size the image so that the ellipse only just
fits on the screen.
Available as: command line option, command
Syntax: (angle float)
Set the rotation angle in degrees. By default this causes recalculation of the screen. You can enable the fast rotation mode, which lets you rotate the screen without recalculation; but it slows down other things, so don't forget to disable it later.
Available as: command line option, command
XaoS has support for rotation of the image to any angle. By default, changing the angle requires recalculation of the whole screen, but when fast rotation mode is enabled, the angle can be changed smoothly. In this mode XaoS calculates a larger non-rotated image and rotates it when needed, so it increases memory requirements and slows XaoS down; hence, it should be disabled when rotation is not being used.
The user interface provides two rotation modes--rotate by mouse which allows the angle to be changed by dragging with the first mouse button depressed, and continuous rotation mode, where the image is rotated clockwise continuously, and the arrow keys can be used to change the rotiation speed.
Syntax: (fastrotate bool)
This function is used to enable and disable fast rotation mode.
Available as: command line option, command
Syntax: (autorotate bool)
Use this function to enable continuous rotation. In the scripting language you
can also use morphangle
to get an outwardly similar
but more controllable effect.
Syntax: (rotationspeed float)
Specify the speed of continuous rotation, in degrees per second. Negative values are allowed and rotate anticlockwise.
Available as: menu item, command line option, command
This menu contains functions that control calculation parameters such as the maximum iteration count and periodicity checking.
- Solid guessing
- Dynamic resolution
- Periodicity checking
- Iterations
- Bailout
- Perturbation
- Zooming speed
- Recalculate
- Interrupt
Syntax: (range integer)
XaoS has a solid guessing optimization: if all corners of a rectangle have the same color, it assumes that the whole rectangle is a solid colored block, and doesn't calculate points inside the rectangle. This optimization saves lots of calculation, but sometimes introduces errors. This value alters the maximum size of the rectangle that can be guessed at one time. The default value is 3; use 0 to disable the optimization.
Available as: command line option, command
Syntax: (fastmode keyword)
XaoS performs many optimizations, but fairly often this is not enough. In order to keep a high framerate, XaoS automatically lowers the resolution of the image, increasing it when there is time for more calculation. This feature is enabled by default when animating, but you might also like to enable it for new images (which makes the image `come into focus' when it is recalculated from scratch for whatever reason), or disable it completely if you don't like it.
In the scripting languge, the keyword should be one of the following:
value | meaning |
---|---|
'never |
Disable dynamic resolution |
'animate |
Use only for animations (default) |
'new |
Use also for new images |
Syntax: (periodicity bool)
Periodicity checking is one way to speed up the calculation. Areas inside the
set always need maxiter
iterations to determine that
the point is probably inside the set (while it is rare for areas outside to
need anywhere near that much). Often the orbital trajectory falls into a
periodic, repeating cycle; if that can be detected, the calculation can be
stopped early, as there's no way that the orbit can ever leave the cycle
again (hence it cannot diverge, hence the point must be inside the set).
Implementating this method efficiently is quite problematic. It slows down the cases where cycles are not found, because cycle-checking is quite hard work and has to take place for all points, even those that don't become cyclic. Because of the inexactness of floating-point calculations, the cycles are never exact, so you need to use an error value. Higher error values mean that cycles will be detected sooner, while lower error values increase the exactness of the calculation. Higher values can introduce serious errors, especially at the front of the Mandelbrot set. XaoS detects this automatically and corrects for it in most cases, but sometimes it might be wrong. Also, other optimizations in XaoS (such as boundary tracing) don't give this method much of a chance to run, since areas inside the set are usually not calculated at all.
That's why the advantages of this optimization are questionable. You should probably experiment with enabling and disabling it. Sometimes XaoS is faster with this enabled, sometimes when disabled. Also, this method works only when incoloring methods are disabled, and only for some fractal types (some fractal types, e.g. newton, don't have any concept of an area `inside the set' at all.)
The tutorial chapter Escape time fractals has
more information on fractal calculation in XaoS, and there is a lengthy
section in the hacker's manual (xaosdev.texinfo
) devoted to the
subject.
Available as: menu item, command line option, command
Syntax: (maxiter integer)
When the fractal set is calculated, a orbital trajectory is examined for each point. If the orbit diverges to infinity, the point is outside the set. Otherwise, the point is inside the set. For exact calculations, you need to know the entire orbital trajectory, which is infinitely long for areas inside the set, so fractals cannot be calculated exactly. By default, XaoS calculates at most 170 positions (iterations) and then gives up; if the point is still inside the bail-out value, it guesses that the point is inside the set.
When zoomed into a detailed area, especially one close to the set boundary, this value could become too low, and the fractal will become boring. You might try increasing this value if you want to get the image interesting again; but this necessarily slows down the calculation at the same time.
The tutorial chapter Escape time fractals has
more information on fractal calculation in XaoS, and there is a lengthy
section in the hacker's manual (xaosdev.texinfo
) devoted to the
subject.
Available as: menu item, command line option, command
Bailout is the value which is checked for each point of the orbit if the point is far enough from the complex zero point in the current iteration. If the point is far enough, then the iteration immediately stops and the starting point on the screen will be painted with a given colour, depending on the fractal type and many other settings.
For the Mandelbrot set this value is 4. Other fractal types usually have the same bailout value. For most fractals many bailout values give more or less similar output. E.g., for the second order Mandelbrot set one can prove that the sequence |z| (z:=z2+c) tends to infinity if and only if |z|>2 for some element z of this sequence. In XaoS program, Bailout value is the square of this 2, i.e. you can change this to any value greater than 2 for similar results.
Other fractal types may use other bailout values. The default is 4 for each types.
Available as: menu item, command line option, command
Syntax: (bailout float)
Perturbation is a simple trick which changes the point at which orbits start. Traditionally zero is used, but other values can generate interesting results too.
On enabling this function from the menu, you will be asked for a complex number specifying the perturbation. It is a toggle; selecting it again resets the perturbation to zero without prompting.
It can be used to specify a complex number representing a point on the screen.
If you hit the B
key instead of using the menu, the current mouse
position is used. This too is a toggle, so B
again will disable
perturbation by setting it to zero.
This function only has an effect for certain formulae (like the Mandelbrot mode.
Available as: menu item
Syntax: (perturbation complex)
This is the scripting-language variation of the perturbation function. Instead of toggling, you always specify the perturbation to use. Use 0 0 to disable perturbation.
Available as: command line option, command
Syntax: (speed float)
Change zooming speed, where 1 is the default, 2 means twice as fast, and so on.
Available as: menu item, command line option, command
In the scripting language you can use the following functions for better control:
Syntax: (maxstep float)
Selects the zooming/unzooming speed. The parameter specifies how much of the range will be removed each twentieth of a second; 0 means nothing, 1 means everything (the parameter obviously has to be less than 1). Higher values mean faster zooming.
Available as: command
Syntax: (speedup float)
When zooming/unzooming, every twentieth of a second the speedup
value is added to the current step until maxstep
is reached.
So this value selects the rate at which zooming stops and starts.
Both these functions are more for internal use of XaoS then for manually
written scripts, but they could come in useful nonetheless.
Available as: command
Syntax: (recalculate)
Recalculate current fractal. This should be used when the fractal on the screen is strange because of error propagation caused by solid guessing.
Available as: menu item, command line option, command
Syntax: (interrupt)
Interrupt current calculation.
Available as: menu item, command line option, command
Filters are a post-calculation effect applied to the resulting image. They can do things like motion blurring, edge detection, emulation of palettes or truecolor on displays that can't handle them, and such things. There is a tutorial chapter about them.
- Edge detection
- Edge detection2
- Starfield
- Random dot stereogram
- Interlace filter
- Motion blur
- Emboss
- Palette emulator
- Antialiasing
- Truecolor emulator
Syntax: (filter keyword bool)
This command is used to enable or disable filters. The keyword specifies the filter to change, and should be one of the following:
value | meaning |
---|---|
'edge |
Edge detection |
'edge2 |
Edge detection2 |
'starfield |
Starfield |
'stereogram |
Random dot stereogram |
'interlace |
Interlace filter |
'blur |
Motion blur |
'emboss |
Emboss |
'palette |
Palette emulator |
'anti |
Antialiasing |
'truecolor |
Truecolor |
Available as: command
This filter is a standard edge detection algorithm; solid areas are filled in black. Some fractals look very interesting with this filter (and some areas of some fractals just look like noise). This version of the filter produces relatively wide lines, so is useful at higher resolutions. The filter edge detection2 makes thinner lines, for the low resolution modes.
Available as: menu item, command line option
This filter is a standard edge detection algorithm; solid areas are filled in black. Some fractals look very interesting with this filter (and some areas of some fractals just look like noise). This version of the filter produces relatively tight lines, so is useful at lower resolutions. The filter edge detection makes thinner lines, for the high resolution modes.
Available as: menu item, command line option
The starfield filter generates random stars whose density depends on the iteration count. Choose your favorite spiral fractal and enable this filter to get a Grand Design spiral galaxy :)
Available as: menu item, command line option
Fractal images are good as a base for random dot stereograms. In case you don't know what these are, please point your browser to Google or another search engine and find some articles about such images, because learning to read such images takes some effort. They make it possible to generate three dimensional images on a normal monitor without any additional hardware, by exploiting bugs in the human brain (although you need two working eyes, and some people never learn to see them; they can simply ignore this feature).
XaoS is able to generate these images in animations, so you may use all normal XaoS functions (except palette changing and palette rotation, which makes no sense applied to a stereogram). To make the animation yet more exciting, XaoS emulates falling into the set; while you zoom in, your distance from the set drops and drops--but you never hit it; when the set reaches the level of your monitor, the distance is changed again so you are far away.
To make this work right, XaoS needs to know the exact size of your monitor. Because most platforms have no way to determine this, you need to use command line options to tune it. If it's not set or is wrong, the stereograms will probably be impossible to see (if your monitor is too big or resolution too low), or the images will seem to be shallow (if your monitor is too small or resolution too high).
By default XaoS expects my 15" monitor (29.0cm x 21.5 cm). Another cause of problems is the virtual screen supported by some windowed environments (like some X servers) that makes a program think that the resolution is higher than it actually is, and you see only part of this extra-large screen.
The worst thing you could possibly do is to run full-screen XaoS in some graphical windowing system (OS/2 on top of Windows or Wine on top of Linux, perhaps) where XaoS can't tell the real size of its window at all. In such cases, it's normally better (not to mention faster) to run XaoS natively, rather than under such an emulation layer.
The following command line options are provided to specify sizes:
-
-screenwidth
,-screenheight
Lets you specify the size of your screen in centimeters. Note that you need to specify the size of the visible image on the monitor, not the size with edge borders, or the size of the tube. The simplistic `my monitor is 17", just turn 17" into centimeters' doesn't work; that 17" is a marketing figure and has only a vague connection to reality. Get out a ruler and measure it. -
-pixelwidth
,-pixelheight
Lets you specify the exact size of a single pixel, if XaoS cannot determine this for itself from your screen size.
These options are used by some other parts of XaoS as well, so you should use them even when you don't want to see stereograms. You should probably write a small starting script (or alias, or shortcut; whatever your environment uses) that passes the correct parameters to XaoS.
If the window is smaller than 8cm in any direction, you will probably be unable to see anything; make the window bigger.
The correct way to see XaoS stereograms is:
- Start XaoS with options specifying the exact size of your screen or one pixel on it
- Sit 60cm away from monitor
- If you use a windowed environment, resize XaoS's window to make it wider than, say, 15 cm.
- Enable the filter (by pressing
E
) - focus on a point far away from the monitor (try to use your own reflection, if your monitor's not antireflective); the random blurring should eventually fall into the pattern of a Mandelbrot set.
- Carefully use your mouse to zoom into interesting areas (it is easy to lose concentration when you are not trained; but you can use the autopilot...)
- Enjoy animation :)
If you still can't see the stereograms, it could be that the fractal, or your eye, is deformed. A deformed fractal can be caused by your specifying your monitor size wrongly. Visual problems that damage depth perception, as well as problems like astigmatism, can make it impossible to see stereograms at all.
Available as: menu item, command line option
The interlace filter halves the horizontal resolution, and in each frame alternates between drawing only the even and only the odd lines. This speeds up the calculation, and in higher resolutions produces a motion-blur-like effect.
Available as: menu item, command line option
Motion blur mixes the current frame with previous ones to produce a motion-blur effect. It might be rather slow in 16bpp truecolor modes. The best results can probably be seen in 8bpp modes, so you might want to enable the palette filter first.
Available as: menu item, command line option
This is a standard emboss filter, as seen in programs such as the GIMP or Photoshop. It produces especially nice results with the smooth outcoloring mode.
Available as: menu item, command line option
XaoS can work in either palette or truecolor mode. Both modes have advantages and disadvantages. Palette mode allows effects such as palette rotation, while truecolor mode allows smoother incoloring and outcoloring modes and the truecolor coloring modes. If your display is truecolor, you can enable this filter to get palette emulation (albeit not as cheaply as in a real paletted mode).
Available as: menu item, command line option
Antialiasing is a technique to increase image quality by eliminating jagged edges. XaoS calculates four values for each pixel (on the subpixel boundaries) and uses the average of them for the pixel value.
This filter slows XaoS down a lot and greatly increases memory requirements. It is useful mainly when you want to save images and want to make them look as nice as possible. Antialiasing also helps a lot when you want to encode JPEG or MPEG files; they are much shorter if antialiased (MPEG and JPEG hate jagged edges).
Available as: menu item, command line option
XaoS can work in either palette or truecolor mode. Both modes have advantages and disadvantages. Palette mode allows effects such as palette rotation, while truecolor mode allows smoother incoloring and outcoloring modes and the truecolor coloring modes. If your display is 8bpp, you can enable this filter to get truecolor emulation (but, obviously, not with as many colors as a real truecolor display).
Available as: menu item, command line option
This menu contains functions to control the user interface layer of XaoS: zooming speed, the autopilot, realtime status information, and so on.
Syntax: (status bool)
Enable/disable status information. This displays some useful information about the current fractal, such as viewpoint etc. (In low-resolution modes it also almost completely obscures the current fractal...)
Available as: menu item, command line option, command
Syntax: (ministatus bool)
Enable/disable status line. This contains basic information such as how much you are zoomed and the framerate.
Available as: menu item, command line option, command
Syntax: (autopilot bool)
To make XaoS yet more impressive, we made a special autopilot mode that
automatically drives into interesting boundaries of the set; you should
press A
, play your favorite music, drink coffee and relax. I never
tried this but it should be really relaxing! Many pictures in the XaoS
gallery were discovered using the autopilot.
The autopilot also has some additional features. It backtracks if the zoomed picture is not interesting anymore, and can detect when it's zoomed into really a boring part of the fractal or reached the limit of floating point arithmetic on the platform, and restart zooming from the top.
Available as: menu item, command line option, command
Syntax: (inhibittextoutput bool)
Prevents XaoS from printing messages when a command is performed. This can be useful if you're using XaoS for a live presentation (VJing) and don't want the messages to get in the way of the picture.
Available as: menu item, command line option, command
Terminate animation replay.
Available as: menu item
Miscellaneous functions.
- Command
- Clear screen
- Display fractal
- Display text
- Color
- Horizontal text position
- Vertical text position
- Message
You can invoke all XaoS functions using a simple command language reminiscent of Scheme. This option lets you run a single command. If you want to run more than one, you might want to use an XaoS animation file instead; they are written in the same language.
Available as: menu item
Syntax: (clearscreen)
Clear the screen. To display the fractal again, use display
.
This function is mainly useful in tutorials and similar animations.
Available as: menu item, command
Syntax: (display)
Display fractal. This functions reverses the effect of the clearscreen
,
line drawing and text output functions.
Available as: menu item, command
Syntax: (text string)
Display the given text on the screen. This function is mainly useful in tutorials.
Text should be cleared by printing lots of spaces, or using the
functions. You might also want to use the textposition
function to select the part of the screen to display the text on.
To wait for the user to read the text, you can use the textsleep
function.
Example:
(clearscreen)
(textposition 'center 'middle)
(text "Welcome into my animation")
(textsleep)
(display)
Available as: menu item, command line option, command
Syntax: (color keyword)
Change text and line color. keyword should be one of 'white
,
'black
and 'red
.
Available as: menu item, command line option, command
Select the horizontal position used to display text. It can be placed at the left, in the center or at the right.
- Left
- Center
- Right
Draw text at the left side of the screen.
Available as: menu item
Draw text in the center of the screen.
Available as: menu item
Draw text at the right side of the screen.
Available as: menu item
Select the vertical position used to display text. It can be placed at the top, in the middle or at the bottom of the screen.
- Up
- Middle
- Bottom
Draw text at the top of the screen.
Available as: menu item
Draw text in the middle of the screen.
Available as: menu item
Draw text at the bottom of the screen.
Available as: menu item
Syntax: (textposition keyword keyword)
Select text position. The first keyword specifies the horizontal
position, the second the vertical position. The horizontal position should be
one of 'left
, 'center
, and 'right
.
The vertical should be one of 'top
, 'middle
, and 'bottom
.
Available as: command line option, command
Syntax: (message string)
This function is almost identical to the text
function,
except that it uses message catalogs in the catalog
directory to
translate messages into other languages. It should be used only in the multi-lingual
XaoS tutorials.
Available as: command line option, command
This menu contains help and tutorials.
- Help
Syntax: (help)
Display the main help page.
Available as: menu item, command line option, command
This menu is displayed at the top of the screen when animation replay is active.
Available as: menu item
Some commands, such as timing primitives or animation functions, are available only in animation files.
Syntax: (load file)
This function lets you include another file in your script. It works similarly
to #include
in C or load
in Scheme.
The file is searched for in the same directory as the current source file.
Available as: command
XaoS has support for drawing lines. These functions are available only in animations and could be used to show some parts of fractals or draw simple diagrams. See the tutorial Introduction to fractals for examples of this feature.
Lines can be drawn in screen coordinates, where 0,0 is the top left corner and 1,1 is bottom right, scaled coordinates, which are similar, but scaled to keep 0,0--1,1 rectangular, or Fractal coordinates, to draw a line at an exact position on the screen.
The color of the line should be specified by the color
command.
You might draw an arbitrary number of lines and, later, morph them. Each line is
identified by a unique numeric key; the current key can be set using linekey
.
Commands for changing lines operate on the line with the current key.
(Lines drawn in sequence have consecutive numbers.)
For example:
(color 'red)
(line 'scaled 0.3 0.5 0.7 0.5)
(line 'scaled 0.3 0.5 0.7 0.5)
(line 'scaled 0.3 0.5 0.3 0.5)
(line 'scaled 0.7 0.5 0.7 0.5)
(linekey 0)
(morphline 'scaled 0.3 0.3 0.7 0.3)
(morphline 'scaled 0.3 0.7 0.7 0.7)
(morphline 'scaled 0.3 0.3 0.3 0.7)
(morphline 'scaled 0.7 0.3 0.7 0.7)
(usleep 1000000)
Creates line morphing to rectangle.
Syntax: (line keyword complex complex)
Draw line between two points.
keyword
specifies type of coordinates and should be one of the
following: fractal
, screen
or scaled
.
This function also increases the line key.
Available as: command
Syntax: (morphline keyword complex complex)
Morph current line to given coordinates.
keyword
specifies type of coordinates and should be one of the
following: fractal
, screen
or scaled
.
The line will start moving at the next timing command, and reach the
final position before the end of it.
This function also increases the line key.
Available as: command
Syntax: (morphlastline keyword complex complex)
This function has the same functionality as morphline, but it doesn't increase the line key, and touches the line with the previous key. This is useful when you want to move a just-drawn line--you don't need to set linekey back.
Available as: command
Syntax: (linekey integer)
Set current line key.
Available as: command
Syntax: (clearline)
Clear current line. This function also increases the line key.
Available as: command
Syntax: (clearlines)
Clear all displayed lines. Lines can also be cleared using the
clearscreen
or display
commands available from the Misc menu.
Available as: command
These functions are used to animate fractal state--to zoom, unzoom and morph various parameters. They should be used only in animation files. Animations are usually performed for a time selected by an immediately following timing function. For example:
(view 0 0 1 1)
(morphview 0 0 2 2)
(usleep 5000000)
Will do a 5 second long unzooming animation.
Syntax: (animateview float float float float)
This function is almost identical to function view
.
It expects that the view will be changed only slightly, so recalculation is done
with ANIMATE
priority. This means that dynamic resolution is used by
default.
Viewport is selected by the center and two radiuses (real and imaginary). See view for more information.
Available as: command
Syntax: (morphview keystring starttime endtime)
This function lets you smoothly start and stop morphing. Specify starttime and stoptime as nonzero, and morphing will speed up and slow down for that number of usecs.
The keystring is used to select what morphing you want to control. It is one of the following:
value | meaning |
---|---|
'view | control morphview |
'angle | control morphangle |
'julia | control morphjulia |
'line | control morphline |
Syntax: (morphview float float float float)
For the time selected by the next usleep
or other timing function, the viewpoint is smoothly morphed from
the current one to that selected by morphview
.
Viewport is selected by the center and two radiuses (real and imaginary). See view for more information.
This function can easily be used for creating zooming/unzooming animations using position files. This is an example position file generated by XaoS:
(initstate)
(defaultpalette 0)
(formula 'mandel)
(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
By replacing the view
command with morphview
and
adding usleep
you can create a zooming animation:
(initstate)
(defaultpalette 0)
(formula 'mandel)
(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
(usleep 10000000)
Available as: command
Syntax: (morphjulia complex)
For the time selected by the next usleep
or other timing function, the Julia seed
is smoothly interpolated from the current one to that selected by morphjulia
. By default this will
cause recalculation of the whole screen.
To avoid this, use fast Julia mode.
A simple animation morphing Julia seed in the X axis:
(initstate)
(fastjulia #t)
(juliaseed -2 0)
(morphjulia 2 0)
(usleep 2000000)
Available as: command
Syntax: (moveview complex)
Smoothly move the image center to another position.
Available as: command
Syntax: (morphangle float)
Smoothly rotate the image to another angle. By default rotation causes recalculation of the whole screen. To avoid this you need to enable fast rotate mode. Don't forget to disable it later, since it slows down other animations. A simple rotozooming animation:
(initstate)
(fastrotate #t)
(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
9.69332308834E-08)
(morphangle 300)
(usleep 10000000)
(wait)
(fastrotate #f)
Available as: command
The functions for zooming/unzooming were created mainly for recording animations. In manually created animation files, it is easier to use.
Syntax: (zoomcenter complex)
This function sets the center to zoom in on. The center is given as a position in fractal coordinates.
Available as: command
Syntax: (zoom)
Start zooming to the area specified by zoomcenter
.
The speed of zooming should be controlled by the function speed
or in a more exact way by maxstep
and speedup
.
Syntax: (unzoom)
Start unzooming from the area specified by zoomcenter
.
Available as: command
Syntax: (stop)
Stop zooming or unzooming.
Available as: command
Timing functions are used to control the animation replay daemon. It can wait for a given time, or wait until calculation is complete. The animation functions are controlled by such waiting; animations that are running while delays start keep running through the delay.
Syntax: (usleep integer)
This function waits for a given amount of time (in usec) before processing the next command. The screen is recalculated and displayed at the beginning of usleep if necessary necessary. The remaining time is spent in waiting or performing animation.
Available as: command
Syntax: (textsleep)
This function's behavior is very similar to usleep
,
but the time is calculated from the number of letters currently displayed
onscreen. If you want to wait just long enough for the user to read the subtitle,
use this function. The user can alter the replay speed as desired using letterspersec
.
This value can be changed during replay with the arrow keys.
Available as: command
Syntax: (wait)
Wait until the image is complete. You should always use this function after zooming or unzooming when dynamic resolution is in use. This ensures that the image calculation will be complete so the user can see the result before the animation continues. It may also be useful in combination with filters like motion blur.
This function deadlocks if used with animation functions; don't do that.
Available as: command
Syntax: (letterspersec integer)
Speed of subtitles for the textsleep
function.
The user can set this value to suit; it can also be changed with the left and
right arrow keys during animation replay.
Available as: command line option, command