Site hosted by Angelfire.com: Build your free website today!
ANIMANDEL is an application to animate the Mandelbrot and MandelBulb Fractal Sets and create videos. It includes support for 3D red/blue video creation, overlaying background images and user defined functions. You can download the latest version of Animandel for Windows here. The Mandelbrot Set is drawn by counting the iterations until the complex function Z=Z^2+C approaches infinity and using this value as a depth. The depth can then be displayed as a color or in 3D. The set can be tweaked to produce interesting animations by simply manipulating the constant C. The MandelBulb is a 3D analog of the original Mandelbrot Set.

Usage

To drive the animation you use the keyboard and mouse or optionally the Navigation window (under Help).
Mouse MovementPans the image.
Left ClickZoom in one step and reposition to the point clicked.
Right ClickZoom out one step and reposition to the point clicked.
Scroll, R,FMove through Z forward/backward.
WStop zoom and follow mouse.
AZoom in repeatedly and follow mouse.
DZoom out repeatedly and follow mouse.
SStop all motion and pause capture.
YRotate Camera +X.
GRotate Camera -Y.
HRotate Camera +Y.
BRotate Camera -X.
IRotate MandelBulb +X.
JRotate MandelBulb -Y.
KRotate MandelBulb +Y.
MRotate MandelBulb -X.
CCapture toggle on/off.
XStop capture and release video file.
ZSet the mouse to the middle of the image so it doesn't drift.
VRedraw the current image without capturing.
QReplay animation in reverse.
EPlay animation forward.
TSet Beginning of animation.

This data can be loaded and saved as a .mndt file through the File menu. It is NOT a human readable file and cannot be edited.

Settings

For control over all aspects of the animation click Edit->Settings. ("inf" indicates the limit is not set by the app. Test the bounds at your own peril.)
WidthThe width of the output image in pixels. (2 to 8192)
HeightThe height of the output image in pixels. (2 to 8192)
ItersThe number of times to iterate the function. (Color depth on Brots.) This will increase rendering time. (1 to 768)
StepsThe number of steps to trace a ray from the camera to the Bulb. Increases rendering time. (2 to inf)
InfinityThe value at which the iteration stops. (>0 to +inf)
FuncThe function to display. The default is Z=Z^2+C+t. This function is iterated until the magnitude of Z approaches infinity.
OpenGLOpenGL can greatly improve the speed of rendering. 2.0 Shaders are required for this option to "take". (checkbox)
PowerFor Variable Power functions the real value Z is raised to. (1 to +inf)
X CenterThe x value (or real part of Z) at the center of the image. (-inf to +inf)
Y CenterThe y value (or imaginary part of Z) at the center of the image. (-inf to +inf)
Z LensThe z value of the camera lens for 3D objects. (-inf to +inf)
RangeThe x,y distance covered by the image. (>0 to +inf)
ZoomThe amount Range is scaled when zooming out. (>0 to +inf)
AnimateWill the object be animated when rendered. There are also animation check boxes next to the items that can be animated. Their values will run from -n to +n as the animation time runs from 0 to 2pi. (checkbox)
SpeedThe amount time is incremented when animating and a check box to turn on animation. (-inf to +inf)
TimeThe animation time. Animation is implemented by multiplying the items selected for animation by sin(time).(-inf to +inf)
MaxOutThe maximum number of images or seconds of video to render.(1 to inf)
Color SchemeThe way the Mandelbrot is colored (just experiment or read the hints below).
Color 1,2,3The Red, Green and Blue values for the three colors used in the color scheme.(0 to 255)
DiffuseWhen tracing this is the color of the object when white light hits it.(0 to 255)
AmbientWhen tracing this is the color of the object when no light hits it.(0 to 255)
BG ColorWhen tracing this is the color when the object is not hit or the ray exceeds "Steps".(0 to 255)
BG ImagesThe .jpg or .bmp files to be used in the "Image" color schemes.
OutputThe .avi or .bmp file pattern to be used as output when capturing. If the file does not end in .avi it is assumed to be a pattern for saving .bmp images.
FPSFrames per second when the output is an .avi file. (1 to 60)

Advanced Trace Settings

When tracing the 3D MandelBulb you have more options effecting the lighting and rotations.
Anti-aliasingThe square root of the number of rays shot thru each screen pixel then averaged. (1 to 32)
Bulb Pitch, Yaw, RollThe rotation of the object thru the X,Y and Z axii respectively. (-180 to +180)
Light PositionThe X,Y and Z coordinates of the light. (-100 to +100)
Light ColorThe R,G and B values of the light color. (0 to 255)
Cam Tilt PYRThe pitch, yaw and roll of the camera. (-180 to +180)
PhongIs phong shading used? (checkbox)
ShadowThe amount light is dampened by shadows. (0.0 to 1.0)
Julia ConstantThe constant to use for Julia fractals. (-2 to +2)
BoundingThe radius of the bounding sphere used to hit check the ray. (>0.0 to inf)
SpecularityThe amount of specular phong highlighting. (0.0 to 1.0)
Specular ExponentAn exponential scale for specular light. (0.0 to 50.0)
Ambient OcclusionFake the ambient light being blocked. (0.0 to 1.0)
Amb Occ EmphasisPuts emphasis on the structures edges. (0.0 to 10.0)
Color SpreadHow much the light spreads when reflected. (0.0 to 1.0)
Rim LightAdds light to unlit sections. (0.0 to 1.0)
FogA scalar for adding (black)fog to the scene. (0.0 to 1.0)
This data can be loaded and saved as a .mndl file through the File menu. It is a human readable text file but be careful editting it.

Startup Options

If you don't care for the default window size or want to change startup folders click File->Startup Options.
WidthThe width of the output image in pixels and similarly the window. (2 to 8192)
HeightThe height of the output image and window. (2 to 8192)
MNDL FilesThe folder for loading and saving .MNDL and .MNDT files.
Image FilesThe folder for loading background images.
Output FolderThe folder for saving images and video.
Motion Blur"No cost" anti-aliasing can be done at high frame rates by averaging consecutive frames. This creates a slight blur.
This data is stored in the MNDLOptions.ini file.

FAQ

Q. What is the difference between an .mndl file and a .mndt file? Why can't I save everything at once?
A. The .mndl file holds all the data to reproduce a specific image. The .mndt file holds the data to reproduce animation movement. They are seperate so that you can apply the animation to different color schemes/resolutions.

Q. So I have an image I like. How do I save it?
A. There are lots of ways... well three.
1) Select Edit->Copy or ctrl-c and then paste in a paint program.
2) Select File->Save As and give it a file name with a .bmp extension.
3) In the Edit->Settings dialog enter an ouput filename. Then as you are animating click "C" to start capture. If you selected an .avi file as the output you will see a dialog asking you to select a compression codec. Movement will be stopped so you need to hit an arrow key or click the mouse to begin capturing. Every time you see the screen update an image is saved to disk until you click "C" again to toggle capture off. You can see this in the title bar (cap:on/off). You can also click "X" to stop capturing and release the video file so you can watch or rename it.

Q. I'm having trouble driving this thing. Any hints?
A. When starting out use the mouse to click into and out of the image. Just select the area that looks interesting and click. When you get the hang of that next try the Up arrow. The animation may move too quickly and you "lose" the image. Just click File->New to start over. Make sure the mouse is centered in the image before hitting the arrow keys or press "Z" to center it for you. If things get out of hand hit the Down arrow and take a breath. Next try zoom in/out with the Left/Right arrow keys. You will most likely need to decrease the zoom. Try 1.01 as a zoom value. Preview your animation by pressing "Q" to watch in reverse. You are now ready to capture your animation! Press "C" to turn on capturing and then "E" to play the animation forward.

Q. I tried capturing and now I have like a million mandelbot.bmp files!
A. If you really have a million then you must have typed 1000000 in the MaxOut field in Edit->Settings. The default is 120 which will give you two minutes of video or 120 still images. Be careful when creating large video files as the .avi codecs can only handle 2gig files so use compression if recording more than a couple minutes at high resolution.

Q. Do I have to use scientific notation when editting values?
A. No but they will be changed into this format anyways so get use to it.

Q. The checkbox "OpenGL" doesn't seem to do anything. What am I missing?
A. Just a speed boost. You can still create videos and user defined functions, they just take longer to render.

Q. I get the error "The graphics processor has stopped..." when running large renders. Wassup?
A. This is a "feature" of Windows Vista and 7 called Timeout and Recovery. If you are brave enough to venture into the registery you can create a DWORD value called TrdDelay under the key:
HKLM\System\CurrentControlSet\Control\GraphicsDrivers. Set its value to the number of seconds before Windows determines your graphics card has hung and needs reboot. You can set this value to 30 seconds. This is NOT the time it takes to draw a complete screen. The screen is sectioned vertically into increments of 16 pixels to avoid this issue.

Hints and Tips

You can drag and drop .mndl files onto the icon or the application window to open them quickly.
When choosing colors for 3D, color1 should be the same color as the left lens of the glasses. (As you wear them.) This is typically red. The other color is a cyan with approximately 96 green and 255 blue.
If you need to calculate the size of an uncompressed video in bytes it is 3*width*height*fps*maxout.
There are 8 available Functions.
Z=Z^2+C+tThis is the standard Mandelbrot Set.
Z=Z^3+C+tZ is cubed, C is the x,y position as a complex number and t is the animation time.
Z=Z^4+C+tSimilar to the above. This is the last "fast" algorithm as the remainder use complex functions.
Z=Z^r+C+tZ is raised to the power "r" where "r" is any real number taken from the Power field.
Z=Z^Wit+CZ is raised to the complex power "Wit" with real part equals the Power field and imaginary part equals sine of the Angle field.
MandelBulbA path trace rendering of the MandelBulb with animated constant,power and rotation. These values are multiplied by sin(time) when animating.
Julia AnimRender the Julia Set for the constant vector and animate by scaling the constant from -2.0 to 2.0
User Defined FuncSupply your own function using OpenGL/SL or ANSI C. (see below)
There are 7 Color Schemes.
2 ColorColor1 represents the low values and color2 the high. Values between are a blend of the two.
2 ExactColor1 represents the lowest value, all other values = color2.
3 ColorColor1 represents the low values, color2 the midrange and Color3 the high. Values between are a blend of either Color 1&2 or Color 2&3.
3 BlendColor 1&2 are blended to represent the low values and Color 2&3 the high. Values between are a blend of Colors 1&3. (What now?)
3D GLassesColor1 represents the red/left side and Color2 the blue/right side. These colors are blended with black as the values increase into the distance.
Img ClrThe color scheme is the same as 3 Blend but where the value is 0 the first image is shown.
Img Clr ImgSame as above but higher values will be blended with the 2nd image (depth becomes transparency).

You can save your animation as a .mndt (Animandel Data File) and replay the animation with different settings (resolution & color scheme). You can use this feature to record your mouse movements with low resolution output and then capture the replay to a video with higher resolution.

Examples

3d SampleHigh Zoom e-14Image Blending

User Defined Functions

OpenGL Shader Language is compiled at runtime. This means you can add code to produce your own fractals. You only have to write the iterating code snippet that supplies a new value for the vector z based on the previous value. The function body you provide recieves the following variables:
IN
Z0=the original x,y,z point
r=the previous radius |z|
p=the power term you supplied in the settings dialog.
r2p=the radius to the p power.
t=the animation time
IN/OUT
Z=the iterating x,y,z vector
OpenGL uses the datatype vec3 to hold the vectors Z0 and Z and floats for the remainder. You access the individual fields of vec3 with Z.x, Z0.z etc. If you don't have a compliant version of OpenGL you can write your function in ANSI C and the app will compile and link to it using TinyCC. In this case the values will be structs (called vec3) and floats but will be accessed similarly. Here is an example that produces the mandelbulb:
float zo = asin(Z.z / r) * p;//change to spherical coords (r,zo,zi)
float zi = atan(Z.y, Z.x) * p;
float czo = cos(zo)*r2p;//do the mandelbulb shuffle (r,zo,zi)^p
Z.x=czo*cos(zi)+z0.x;
Z.y=czo*sin(zi)+z0.y;
Z.z=r2p*sin(zo)+z0.z;
Now try adding a line at the end to give it "hairs"...
if(Z.y>t)Z.y=t;
Then run an animation of this to see what happens.
You can create lots of interesting morphs of the original try adding t to zo, but we want to do more than that. We want to create our own version. To learn how lets walk thru the steps to produce the original mandelbrot.
The function is Z=Z^2+C where Z is a complex number Z=(x,yi), and C is the original set of coordinates C=(x0,y0) so ...
Z^2=(x^2-y^2,2xyi) or x=x^2-y^2, y=2xy;
float x=Z.x*Z.x-Z.y*Z.y+Z0.x;
Z.y=Z.x*Z.y*2.0+Z0.y;
Z.z=Z.z*Z.z+Z0.z; //we have to set Z.z to something to give it depth
Z.x=x;
Thats it! Now make sure the POWER field is set to 2 and render it. It doesn't look exactly like the original because we gave it depth. The MandelBulb evolved from trying to find the 3d analog to this simple function which would provide the same level of detail in all 3 dimensions. We will see the connection between these two formulas if we make ours handle any power. To do this we need the formula for raising a complex number to a real power.
(x,yi)^p
Step 1: Change to cylindrical coordinates.
r=sqrt(x*x+y*y)
zi=atan(y,x)
Step 2: Apply the power p. Take r to the power p and multiply the angle zi by p.
r2p=pow(r,p)
zi*=p
Step 3: Switch back to complex coords
x=r2p*cos(zi)
y=r2p*sin(zi)
FINIS! Lets turn that into code and try it.

float zi=atan(Z.y,Z.x)*p;
Z.x=r2p*cos(zi)+Z0.x;
Z.y=r2p*sin(zi)+Z0.y;
Z.z=Z.z*Z.z+Z0.z; //still cheating with z to give it depth
Now try this at any power and you get something that looks like an onion blossom. mmmm. We are half way to the MandelBulb now! The trick is next to think of the vector(x,yi) as the real axis and z as the imaginary axis of the "really" complex number ((x,yi),zi).
float zr=sqrt(Z.x*Z.x+Z.y*Z.y); //this is the length of (x,yi)
float zo=atan(Z.z,zr)*p;
float zi=atan(Z.y,Z.x)*p;
float czo=cos(zo)*r2p;
Z.x=czo*cos(zi)+Z0.x;
Z.y=czo*sin(zi)+Z0.y;
Z.z=r2p*sin(zo)+Z0.z;
Now we have the original MandelBulb function except atan(z,sqrt(x*x+y*y)) has been replaced by the simpler asin(z/r). Now its up to you to invent better functions.

You can see videos at You Tube (ytalinflusa). Have fun and send us your artwork!