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. |
UsageTo drive the animation you use the keyboard and mouse or optionally the Navigation window (under Help).
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. SettingsFor 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.)
Advanced Trace SettingsWhen tracing the 3D MandelBulb you have more options effecting the lighting and rotations.
Startup OptionsIf you don't care for the default window size or want to change startup folders click File->Startup Options.
FAQQ. 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 TipsYou 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.
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
User Defined FunctionsOpenGL 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 depthNow 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! |