Copyright (C) 1997,98 Dirk Meyer
email: dirk.meyer@studbox.uni-stuttgart.de
Idea and purpose of this program is the calculation of three-dimensional fractals. The calculated objects are twisted, freely in space floating (and - of course - fractal) "lumps" which look like made of dough - in contrast to what is normally called "three-dimensional" fractals (namely a simple reinterpretation of the two-dimensional data).
The objects can be colored by linking space coordinates (or other parameters in later versions) to colors using a mathematical formula. The palette of colors can consist of up to 50 colors or color ranges.
Additional, it is possible to define intersection planes. With this feature the internal construction of the fractals can be displayed. Of course, especially interesting is an intersection with the complex plane: you get the usual two-dimensional fractal as intersection object how it could also be calculated by "Fractint" for example. Moreover it can be seen how different regions of the two-dimensional fractal are connected together in three-dimensional space.
Normally, the the picture is calculated and saved in 24bit true color, but it can be displayed in 256 color during calculation (however in poorer quality).
The fractals calculated with Quat correspond exactly to the usual, two-
dimensional "julia sets", which almost every fractal program
can calculate. (As iteration formulas available are xn+1 = xn2
- c and xn+1=cxn(1-xn) ; x0
represents the pixel being calculated.)
To achieve the third dimension, Quat uses the so-called "Hamiltonian
quaternions" instead of the complex numbers with two components (real
and imaginary part). The "quaternions" are a generalization of
the complex numbers and consist of 4 components (1 real part, 3 imaginary
parts). If you set the 2 additional components to zero, you get the usual
complex numbers. Using quaternions (by the way, the name "Quat"
is derived from "quaternions") it would be possible to calculate
even four-dimensional fractals, nevertheless, only three-dimensional ones
are really calculated. (If somebody invents a four-dimensional monitor,
I will agree to change my program accordingly... :-) )
Generation of a really three dimensional view is possible (3d stereo). The fractal can be seen three dimensional without any utilities like 3d glasses.
The output format is the PNG format. It is the successor of GIF and offers - like GIF - compression of image data without loss of quality (JPEG compresses better, but the quality gets worse). More information on PNG: http://www.cdrom.com/pub/png. Because of the fact that PNG allows the storage of data specific to the application, Quat saves all data neccessary for the generation of the image within the PNG picture.
Quat uses a library named "ZLIB" to write the PNG-files. This library is a compression library and has nothing to do with fractal calculation. It was written by Jean-loup Gailly and Mark Adler. More information on ZLIB: http://www.cdrom.com/pub/infozip/zlib
Quat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Special thanks to Max Schwoerer for the clarification of some of the
juridical questions, and to Oliver Siemoneit for his help on the English
translation.
Many thanks to Larry Berlin (lberlin@sonic.net)
for his advice in stereo view related topics, his many ideas for how to
improve the program (especially the user interface), his testing of pre-release
versions of Quat 0.92 and last but not least for the title image of Quat
that he created!
Larry Berlin maintains a great 3D-ezine (http://3dzine.simplenet.com/3dzine.html).
He plans to show a gallery of images he derived from objects generated
by Quat. I had the chance to see some examples. Really worth visiting!
Thanks to Eva-Maria von Garrel for testing.
Version 0.92:
Version 0.91: (8/2/1998)
Version 0.90b: (14/9/97)
Version 0.90: (29/7/97)
Initial version.
Theoretically none, if you are able to compile ANSI-C-Code with your system... :-)
The requirements for the pre-compiled versions of Quat are:
The source code of Quat is available, so it is possible to create a text only version (without graphical display, minimal memory usage) on any system that can compile ANSI-C. This makes sense for UNIX systems for example, which often have a GNU-C compiler installed along with the operating system.
If you have some proposals for improving this program or if you want
to report a bug, please send me an email (dirk.meyer@studbox.uni-stuttgart.de).
I appreciate any feedback, especially because this version is a beta- version.
Almost for sure there are some bugs in it. If you like to (and are able
to) program, you can send me your C-code. I'll build it into future versions.
(Of course I'll mention you as the author!) I have the model of "Fractint"
in mind, maybe there are also some enthusiasts in this case!
My postal adress is:
Dirk Meyer
Marbacher Weg 29
D-71334 Waiblingen
Germany
New versions (and the source-code) of Quat are available at http://wwwcip.rus.uni-stuttgart.de/~phy11733/index_e.html
Essential part of the calculation of fractals is a formula to iterate. (There are other types of fractals, but this is the one most commonly used). "Iterate" means, that the value, which resulted through the formula, is feeded in it again the next step, and so forth. Such a step is called an iteration. The point, which is to be calculated, is used as starting value.
A point in this context is a complex number (in case of a two-dimensional fractal). A complex number consist of two components, which are independent of each other. They are called real and imaginary part. If the imaginary part is zero, the complex numbers are identical to the real numbers (e.g. 1.23324, -23, ...). To mark the imaginary part, the letter "i" is used. There is one rule: i*i=-1. (This fact shows, that "i" can't be a real number, because no real number multiplied with itself is -1.) In general a complex number "c" is written like this: c = a + i*b, where "a" is the real part and "b" is the imaginary part (both are real numbers). In two-dimensional fractal programs the real part is identified with the X coordinate on the screen, the imaginary part with the Y coordinate.
Quat needs numbers which have one component more to calculate its fractals. This component is necessary for the Z coordinate. Such numbers don't exist, but there are numbers with four components: the Hamiltonian quaternions (sometimes also called "hypercomplex numbers"). They consist of one real part and three imaginary parts. The signs for these parts are e, j, k and l. "e" corresponds to the real part (e equals to 1), "j" to the imaginary part of the complex numbers. In case k- and l-part are zero, we again have the good old complex numbers. There are special multiplication rules for e, j, k and l. (These rules reveal a difference between quaternions and hypercomplex numbers, but it isn't of any importance for this section. Quat uses quaternions, but for simplicity I'll use both names exchangeable.)
Four components would allow even four-dimensional fractals, but for practical reasons (see above) and the limitations of human mind (_not_ the programmer's incapacity...), Quat is "only" able to render three-dimensional fractals. The additional fourth dimension (fourth component) is set to a constant value, which is defined by the parameter "lvalue" in the OBJ-file (User interface versions: in the Object Editor). This proceeding produces a three-dimensional intersection of a four-dimensional fractal analogous to the two-dimensional intersection of the three-dimensional fractals calculated by Quat which is made by common fractal programs.
Back to our iteration formula. Quat uses one of the following formulas:
xn+1 = xn2 - c; or xn+1
= c*xn*(1-xn)
x0 is the starting-value ( = point that has to be calculated)
"n" is a count index which numbers the "x" (n=0,1,2,3...).
The value "c" in the formula is a hypercomplex number, that remains
constant during the whole calculation. This is defined in the Object Editor/OBJ-file
as parameter "c". "c" determines
the shape of the fractal.
One could see that the sequence of all xn defined by the iteration formula can show three different schemes:
The object drawn by Quat is the amount of all points ( = numbers) x0, for which the sequence defined by the formula doesn't go toward infinity. (In other words: which doesn't show scheme 1. or 2.).
This formulation isn't completely exact: there is the problem that a computer can't do the calculation up to infinity to see whether the sequence converges or not. (The reason is the limitation of human life, again not incapacity of the programmer :-) ). Because of this the calculation is stopped after a previously defined number of iterations. This number is set in the Object Editor/OBJ-file through the parameter "maxiter". But how does Quat know after maxiter iterations whether the sequence goes to infinity or not? Thus there is the value "bailout" (naming freely after "Fractint"). If this value was exceeded during the maxiter iterations, it is assumed that the sequence goes towards infinity.
Now we are able to describe the calculated object exactly: It is the amount of all points ( = numbers) x0, for which the sequence defined by the iteration formula of the xn didn't exceed the value "bailout" after at most "maxiter" iterations. (How complicated nice shapes are described mathematically... On the other hand: How nice mathematics can be!)
But to calm you down a little bit: those who don't understand all this or who simply are not interested in it can, nevertheless, calculate nice pictures.
What we have up to now is an object in Quaternion-Space (Q-Space). What we don't have is someone, who looks at this object. That means: we have to project the object onto the screen. Therefore we have to define a view window on a view plane in Q-Space, which represents the screen. The way the object is seen by the view plane is the way it is displayed on the screen.
As a result we have two different coordinate systems: First, the system that has to be displayed (the Q-Space), second, the system on which is projected (view plane, monitor).
The Q-Space is defined by three axes, called e, j and k, analogous to the components of hypercomplex numbers (the l-part is set to a constant value, see above). The e-axis is the real axis ("ray of numbers"), the plane defined by e- and j-axis is the complex plane, in which 2D fractal programs calculate their fractals.
On the view plane there are two axes of the view coordinate system, called X and Y axis, which correspond to the horizontal and vertical direction of the monitor. Additional there is a Z axis, which points perpendiculary away from the view plane and into the direction of the fractal.
Regarding the fact that fractal objects are always around the origin of the Q-Space, the following way to construct the view plane seems obvious. There is a point in Q-Space defined in the initialization file, the "view point". The view plane goes through the view point and is perpendicular on the vector from the origin to "view point". ("view point" has a double meaning: it defines position and orientation of the view plane). The view point defines the Z axis of the view coordinate system. Henceforth we will move only on the so defined view plane.
Now there has to be taken a rectangular window on the view plane (= the view window), which is oriented in the way that two opposite lines of the rectangle are parallel to the projection of the "up vector" (see later) on the view plane. The direction of this projection is called Y direction and corresponds to the vertical direction on the monitor. The horizontal direction is called X direction and corresponds to the two other lines of the rectangle. As we see, the "up vector" defines where is up. Accordingly the directions of X and Y axis have been defined through this.
The diagonals of the view window/rectangle intersect in the "view point" (This means that the view point lies in the "middle" of the screen/view window). Now the view window is scaled around the view point as follows: the side which is the X direction gets the length "lxr" (measured in Q-Space, see parameter "lxr") and the relation between the lengths X and Y gets the same value as the relation between the X and Y resolutions (see parameter "resolution"). (to achieve display without distortment). The base vectors of the view window (derived from X and Y directions) get the length 1. Now we are ready. The view coordinate system is defined completely.
To get all possible positions of the view window (up to now every describable plane is oriented around the origin), the view plane is shifted in X and Y direction to the amount of the values given through the parameter "move" (it's a movement in the view plane's own coordinate system).
This new feature of Quat 0.92 makes it possible to split the calculation
into two parts: into the slow fractal calculation and the relatively
fast display of the image. To do this, Quat generates a so-called
ZBuffer, in which the shape of the object as seen from the viewpoint is
stored.
Having created a ZBuffer, you can still change certain parameters (light
source, palette, color formula, Phong highlight and ambient light) and
generate an image from the ZBuffer, what works relatively fast.
Chart 1: Different way to an image
ZBuffers open a wide field of experimentation, you can find out the
best look of the object by trying some different looks.
ZBuffers have the suffix "ZPN". The full set of parameters is
stored in it, as well as in images (PNG). ZBuffers are quite usual PNG
files, but they don't contain an image. Some graphics programs even recognize
them and display them very easily when they are opened, some other need
the suffix to be changed to "PNG". I don't know if it makes sense
to directly view ZBuffers, because one can't do anything with the data
stored therein.
Starting Quat:
Description of the menus:
"Image" menu:
Image | Open...
Opens an image (PNG file), shows it and reads the parameters
stored in it. Quat shows how much of the image is already calculated afterwards.
You may get the error message "PNG file has no QUAT chunk". This
happens if you try to open a PNG written by another program. In this case
Quat can't read the fractal parameters.
Note: In 256 color modes you should use a specialized program to view the
image, because it can do a better job with the limited amount of colors.
"Graphic Workshop for Windows 1.1u" or "Paintshop Pro 3.11"
support PNG images (Windows), also "XV 3.10a" with the PNG-patch
(X).
Image | Close
Closes the image, but leaves the parameters in memory. If you
want to change some parameters of an image and want to recalculate it,
you must first close the image, then change the parameters and as last
step start the calculation.
Image | Save
Save the image (PNG) using the name shown in the title bar.
Often this is a name generated automatically with a number at the end.
All parameters needed for recalculation of the image are stored along with
the image.
Image | Save As...
Like "Image | Save", but uses a custom name for the
image. You can enter the name in the dialog which opens after selecting
this command.
Image | Adjust Window
Sets the window size to the size of the image (as long as it
fits on screen)
Image | About
Shows information on Quat.
Image | Exit
Exits from Quat.
"Calculation" menu:
Calculation | Start/Resume an image:
Starts a calculation of an image using the current parameters
(see "Parameters" menu) or resumes a stopped one. If you have
a Z buffer open (which must be calculated completely), you can turn it
into an image using this option. (See section 2.3)
An image is a fractal object which is lighted and colored, as opposed to
a Z buffer.
Calculation | Start/Resume a ZBuffer:
Starts a calculation of a Z buffer using the current parameters
(see "Parameters" menu) or resumes a stopped one.
A Z buffer has the shape of the fractal object, but has no colors and is
not lighted. Calculating a Z buffer does most of the calculation, turning
a Z buffer into an image is relatively fast. The advantage is, that you
can still change the parameters (colors, light) that don't affect the shape
of the fractal and render an image in a short time. If you don't like the
appearance of the object, simply close the image, which will return you
to the Z buffer. See section 2.3 for more information
on Z buffers.
Calculation | Stop:
Stop the running calculation (of both an image and a Z buffer).
You can resume calculation, see the two menu points above.
"Parameters" menu:
Parameters | Reset:
Resets the parameters to their default values. If you calculate
an image with these values, you will get a sphere.
Parameters | Read from INI:
Reads in the parameters for creating an image. It doesn't
reset the parameters to default values first! (Use "Reset" to
do this.)
The INI file may have been created by "Save As..." or with a
text editor. An INI file holds data necessary to generate an image.
You can also read in a COL file previously saved in the Color Editor.
Parameters | Read from PNG:
All data necessary for image generation is stored in the image
itself (according to PNG specification). This menu point reads the parameters
from the image for re-generation or editing.
Parameters | Save As:
Writes the parameters to an INI file, which is a simple text
file that can be edited with a text editor. You can use this option if
you want to calculate the image with the text version of Quat. (Text versions
use INI files to get the parameters they need.)
The editors (in which you can edit the parameters):
Parameters | Object Editor:
A dialog opens which looks as follows (shown here: X-Window-version
with KDE Window Manager):
In this dialog you can specify the fractal data of the object. This
data determines the shape of the fractal. You can enter values for following
keywords: "maxiter", "lvalue",
"bailout" and "c".
(See their description in Section 4.1).
Additional the editor has the ability to see the effect of a change of
a value immediately (... if you have a Pentium or above / in a few seconds
for a 486). You see a "Mandel Preview" which shows the
Mandelbrot set (or, more exactly, two dimensional intersections of the
four dimensional generalization of the Mandelbrot set). This set can be
seen as a map for "Julia sets" (the objects being calculated
by Quat). The red cross marks the selected point "c". Every point
"c" generates another Julia set. Points that lie in the Mandelbrot
set (the black figure) lead to connected Julia sets, the other case they
are split up.
You can click or drag with the mouse into the Mandelbrot Preview to move
the red cross. The values for the first two parts of "c" are
updated accordingly.
If you click the right mouse button in the Mandelbrot Preview, it gets
updated. This is necessary if you changed "maxiter", "bailout"
or the last two parts of "c". In the X-Window-version a red frame
around the preview window shows that an update is necessary.
The six buttons below the Mandel Preview serve the navigation in the Mandelbrot
Preview. You can move and zoom the section that is shown.
The upmost button "up" moves the viewable section up, the downmost
down. The one on the left moves left, on the right right. The two buttons
in the middle zoom in "+" and out "-".
In the "Julia Preview" you can see two dimensional intersections
of the subsequent object. If you hit the "2D-Preview" button,
the Julia set according to the current values is calculated. With the scroll-bar
"3rd-dim. Intersec." you can choose which intersection with the
three-dimensional object you want to see. Change it and hit "2D-Preview".
If you put these different intersections on top of each other (in mind),
you get a bit of an imagination how the three-dimensional object will look
like.
If you press the button "3D-Preview", you'll get a three dimensional
image as Quat would calculate it. This kind of preview is relatively slow,
so it is recommendable to first use 2D-Preview to see whether the fractal
is according to your imagination and play around with the parameters until
it is and then use 3D-Preview. The check box "use own view"
decides whether a standard view is used in 3d preview or whether those
parameters will be used, which are adjusted in the other editors (view,
colors,...).
Parameters | View Editor:
This dialog looks as follows (shown: Windows version)
Here is the place to define how the object should be viewed. A view
plane (on which the fractal gets projected) is defined by the parameters
"viewpoint", "up",
"move", "lxr"
and "interocular". The "light"-source
is also defined. (See descriptions in Section 4.1).
Next to the edit control for "interocular" there is an angle
shown. It is the angle between the left eye viewpoint, the origin (before
applying the MOVE) and the right eye viewpoint. This angle should be between
3 and 6 degrees if you want to create a 3D stereo image pair. If interocular
is zero (and thus the angle is also zero), a 2D projection of the fractal
object is generated.
Because it would be boring if you could only enter values you could also
enter in a text editor (INI file), there are three views of the view point
in this dialog. (You look at it "from above", "from beside"
and "from front".) The black arrows are the axes in Quaternion
space (or the three-dimensional sub-space defined by "lvalue"
[Object Editor].) "e" is the usual real axis, "j" the
imaginary axis (same as with complex numbers; These two are used by every
2D fractal program) and "k" points into the third dimension (there
is no "l" axis as the value for l is constant ["lvalue"]).
The arrows point in the direction of positive values, the length of an
arrows corresponds to the length 2 in Q-space.
The blue rectangle marks the view point, the green rectangle shows the
size of the view plane. You can click into the blue rectangle and drag
it to a position of your choice to change the view point. Some positions
are not defined (if the view point is (0,0,0) or if the "up"
vector is perpendicular to the view plane)
The yellow circle is the origin of the view coordinate system (= the upper
left point on screen)
If you want to specify colors (or better, color ranges), do it here.
To the left you see a vertical scroll bar which you can use to select the
color range you want to edit. Next to it there are two buttons, "Add"
and "Del". "Add" adds a color range before the current
position in the palette, "Del" deletes the active color. There
has to be at least one color, and not more than 30. For each color range
you can enter values for the start color ("Color 1"), the end
color ("Color 2") (or press the buttons "Sel" to get
the standard Windows/KDE dialog for choosing colors) and a weight for the
color range.
The weight defines how much of the palette is made of the selected color
range. This last value must not be zero. (See also section 4.2).
If you don't want to create a color range but only a color, set both colors
(Color 1 and Color 2) of the color range to the same values.
For every one of the two colors there are two buttons "Copy"
and "Paste". "Copy" copies the corresponding color
into the clipboard (not into the global one of Windows/X, but into the
rectangle in the upper right corner). "Paste" replaces the corresponding
color with the color in the clipboard.
Below these items there is a preview of the whole palette. The selected
color range is marked through a black rectangle. The color preview is intended
for high- and true-color modes, if you use a mode with fewer colors, the
preview is not excellent...
Below this preview you can enter the color scheme formula either directly
or by choosing one of the predefined formulas. (See key word "colorscheme")
If you hit the "Save As" button, you can save the color information
in a COL-file, which can be read in with "Read from INI".
Parameters | Intersection Editor:
Is used to define intersection planes. The scroll bar on the left has the
same purpose as in the "Color Editor" described above: Select
the object to edit. The buttons "Add" and "Del" also
work like above, one adds a new plane, the other deletes the selected plane.
There may be between 0 and 20 intersection planes. A plane is defined by
its normal vector (pointing into the half-space in that the object should
disappear) which must not be zero, and a point on that plane. (See also
section 4.3)
Parameters | Other Parameters:
Other Parameters are "resolution",
"phong", "ambient"
and "antialiasing". See section
4.4 for the first one, and section 4.1
for the last three.
Windows only: You can adjust the number of pixels calculated before events
are checked. That means that user input and the display of the image is
only done every n pixels. If you set this to a high value, calculation
will be somewhat faster.
In the Dialog there are five buttons (Resolution shortcuts). If you hit
one of them the resolution is set accordingly to the button hit.
In this dialog the calculation time needed to calculate the image so far
is shown.
ZBuffer menu:
To learn more about Z Buffers, please read section 2.3. The commands in this menu are for opening, saving, saving as and closing a Z Buffer.
If you want to use INI files to feed Quat with information, it can also
be used completely through the "Explorer". It can be used in
similar manner if you use the X Window System with the KDE Window Manager
(highly recommended!), but this description refers to Windows.
Files with suffix "ini" are associated to the notepad/editor
by default. A double click on an ini file opens it for editing, so it is
no problem to change a value, or something else.
In the context menu (right mouse button on a file) you can additionally
create an entry to start the calculation of the ini file. To create the
entry, do the following: (Note: I have a German version of Win 95, I do
not know the exact names of the English version, I can only try to translate
from German.)
If you click with the right mouse button onto an ini file, you are now
able to select "Calculate" in the appearing context menu. Quat
will start the calculation of the fractal described in the ini file immediately.
In the same manner you can create a process "Continue calculation"
for the file type "png". This will allow you to continue calculation
of images (which are not yet finished) by only two mouse clicks. In some
circumstances the file type "png" is not registered. If this
happens, you have to create this file type.
There is another possibility for use: You can create a link to Quat on
your desktop. If you have done this, you can simply drag an ini or png
file out of the Explorer and drop it onto the Quat-icon on your desktop.
Quat will immediately start or continue the calculation.
To create the link, you only have to go to the directory you installed
Quat to (using the Explorer), drag "Quat.exe" (or "Quat")
and drop it onto the desktop. Windows creates an icon at the place you
dropped it.
(Not applicable to versions with user interface.)
Quat understands following parameters, which are given in the command-line:
-i <ini file> | calculates an image from an ini file. (Ini files are used for feeding Quat with the values it needs to start a calculation) |
-z <ini file> | calculates a Z buffer (suffix ZPN) from an ini file. |
-i <zpn file> | generates an image by using a precalculated Z buffer. (This of course is much faster than calculate from an ini file.) |
-i <zpn file> <ini file> | generates an image from a Z buffer, but replaces certain parameters (coloring e.g.) with the values given in the ini file. |
-p <png or zpn file> | reads the parameters that have been used to calculate the image/zbuffer and writes them to an ini file. |
-c <png or zpn file> | continues calculation of an unfinished image. The ini file that has been used to generate the image is not needed. |
-h | shows short information. |
A call looks like this:
quat -i test.ini
A calculation is stopped by
If you use a version with a user interface (called "UI" in
the following) you can skip this section 4 (but you should read the sub-sections
4.1-4.4, where you'll find the descriptions of the parameters in the Editors).
In text files the parameters necessary to start a calculation are defined.
(As mentioned above: once the calculation had been started, they are superfluous.)
Their structure is quite simple:
The double cross (#) introduces a comment. Everything written
after it in the same line is ignored. Normally a line begins with a key
word, which is followed by one ore more parameters. The parameters and
the key word have to be in the same line and have to be seperated by blanks.
Following types of parameters are possible:
int: integer values (like 1, -1, 0, 2, 3, 1001, ...)
float: floating point values (like -0.2353, 21.21324, 0.001, ...)
strings: strings of characters
If a key word is not mentioned, a default value will be used instead. Some
example files are included in the program's distribution kit. You should
look at them, for many things will become clear in an instant simply by
looking at them, whereas it is more difficult to understand it only theoretically.
0 | xn+1 = xn2 - c |
1 | xn+1 = cxn(1-xn) |
A color in Quat is represented by a red-green-blue triple, where red,
green and blue are numbers from 0.0 to 1.0.
When using a color together with other colors (as it is in a palette) every
color needs some kind of factor, that defines the amount of the palette
to be occupied by the color. Same is true for color ranges. The factors
or weightings of all colors and/or color ranges are summed up by Quat to
find out what 100% are.
It is possible to define many colors and color ranges, which taken together
are building the palette. The color described first in the file corresponds
to the value "0.0", the last one "1.0". This will become
important when we'll see how to get the color we want through a mathematical
formula. The key words are:
Objects can be defined (only planes yet), which intersect with the fractal
object.
Key words:
[ looking for somebody to translate this section... ]
The German version of this section describes how you could do with "Fractint"
what you can do with Quat now (>=0.92) in the "Object Editor"
if you use the user interface version.
Here is described how a z-resolution that is too low can cause strange images and how antialiasing can reduce the Moire-effect. All images are low-quality-JPEGs.
![]() |
![]() |
![]() |
Image 1: This is an example for a depth resolution
that is too low (240): "resolution 320 240 240". You see the
frayed edges of the blue parts of the object. There the object is so thin
that it is not hit by a calculation with z-resolution of 240. No antialiasing is done: "antialiasing 1" |
Image 2: This image has an increased z-resolution
(2048): "resolution 320 240 2048". The edges are no longer frayed
out. Nevertheless you can see disturbing patterns of pixels caused by the so-called Moire-effect (on the orange parts of the image e.g.). They could be reduced by antialiasing, which is not done in this example: "antialiasing 1" |
Image 3: Here is the image for reference. It has a z-resolution that is high enough (2048): "resolution 320 240 2048" like the image on the left. Additional it has an antialiasing value of 4: "antialiasing 4", which means that every pixel is the average of 4x4 sub-pixels. |
Perhaps you know from the "Magic Eye" books that special ways
to look at something (without any additional equipment like 3d glasses)
can produce very amazing three dimensional perceptions. The principle used
by Quat is different from that of the "Magic Eye" books (Autostereograms),
but in my opinion it is easier to learn and achieves great results!
The principle is as follows: Two images seen from two slightly different
points are calculated and displayed next to each other. The image to the
right is for the left eye, the image to the left for the right eye. (Thus
the name "cross eyed"). If you hold your thumb in ca. 10 cm distance
in front of your eyes and look at it as usual, you'll remark that you see
the background twice. This is what the principle builds on.
Look at the example image above. Sit in front of the screen at the distance
you usually work at, and then hold your thumb between screen and your eyes
(nearer to the eyes than to the screen). You should sit straight in front
of the screen, not incline your head and not look from beside at the screen.
Now look at the thumb as usual. Pay attention to the images on the screen
(without looking at them directly, always look at the thumb!)
If you see four images now, then the thumb is too near to the eyes. Move
it a bit further away from the eyes and look at it again as usual, while
paying attention to the background. Change the distance thumb-eyes until
you only see three images. Now the one in the middle is seen three dimensional,
but perhaps not sharp. To get a sharp image is a matter of concentration,
with increasing experience it gets easier. Watch the non-sharp image for
a while (but don't look at it directly). There'll be a point at which mind
begins to recognize, that the data that it gets, make really sense and
it tries to make it sharp. For some people this process is a bit difficult
(as it was for me), others have no problem with it.
By the way, this way to view is not an exotic feature of Quat, in the Internet
such stereo images are widely used. This way it is possible to display
a photograph of a landscape three dimensionally, for example
Initialization files are used to feed Quat with the parameters it needs
for image generation.
Users of a version with user interface (Windows, X Window System):
Though this paragraph also applies to these versions, most users probably
do not need to read it. You can use the dialogs to enter parameters conveniently
- but if you want, you can also use initialization files.
To start a calculation in the text only versions, a so-called "initialization
file" is needed, in which the object, the view, the colors and intersection
planes are defined. This file (and all that are "included", see
below) are simple text files, which can be written in any common text-editor,
(for example, "edit" with DOS, "notepad" with Windows,
"vi" with Unix). The syntax used is very simple, in every line
there is a keyword with a list of parameters following. (e.g., "viewpoint
0 0 1" defines the viewpoint)
In this initialization file you can include other files automatically (by
using the keyword "include"). This makes it possible to define
color ranges seperate from fractal data or intersection planes (in files
with a different suffix, e.g.). If such a file is included at a special
location in the initialization file, it is the same as if its contents
would be typed in at this location. The initialization file is only required
to start the calculation. Once a PNG file has been created, they aren't
needed any more. The fractal data is stored in the PNG file itself an can
be reconstructed from it.
Suggestion of how to separate the data in different files:
INI this file suffix type is given by Quat. Is is
the initialization file. All the information needed to generate an image
can be saved in it. It is also possible to "include" other files
(as suggested here).
OBJ Fractal parameters determining shape and viewpoint,
from which the object is shown and some raytracing parameters, which specify
the illumination, are defined in files with this suffix.
COL stores color or color-range of the object
CUT These files serve for the declaration of a intersection
plane configuration. (in most cases probably only a single intersection
plane).
This concept may appear a little bit complicated on the first view, but it offers high flexibility. For example, it allows to give the fractal other colors very quickly, or to add some intersection planes without changing something on the object-definition itself: Only one line in the INI-file has to be changed. But for those who still think this to be too complicated: You can use all keywords in the initialization file, too.