Fractal Generation Program

Windows Version
Written by Cathy Saxton
Copyright ©1999. All rights reserved.


Topics:
The Basics -  Calculating Fractals -  Status Bar -  Fractal Statistics Dialog -  Menu Commands -  Keyboard Shortcuts


The Basics

Left Click to zoom in. Right Click to zoom out.

Ctrl + Left Click to re-center.

Shift + Left Click in the Mandelbrot set to show the Julia set corresponding to the clicked coordinate.
Shift + Left Click in a Julia set to show the Mandelbrot set centered at the coordinate used for that Julia set.

Hit F1 to show help.

See the View menu for available adjustments.

Calculating Fractals

The Mandelbrot and Julia fractals are drawn in the complex plane (real numbers along the x-axis, imaginary numbers along the y-axis). The value for each coordinate is determined by iterating the function
      z(n+1) = z(n)^2 + C
There are two possible outcomes for the series. The series may diverge, that is grow without bound farther and farther away from the origin. Or, the values in the series may stay near the origin forever. Those points whose series stay near the origin forever are inside the set. Those points whose series diverge are outside the set.

It can be shown that if the magnitude of z(n) is greater than 2, then all successive values will be larger than their predecessors. Thus, we can assign a value for each coordinate equal to the number of iterations it takes that point's series to exceed the magnitude 2 limit. Points whose series exceed the magnitude 2 limit have a finite value and are outside the set. By convention, points inside the set are colored black; points outside the set are colored according to how quickly they escaped the magnitude 2 limit.

Since we don't want to run forever to find the set, we set an iteration limit. Points whose series stay within the magnitude 2 limit up to the iteration limit are colored black. The higher the iteration limit, the more accurately the black pixels represent the actual set.

For the Mandelbrot set, z(0) is always 0. For each coordinate in the Mandelbrot set, the series is computed using that coordinate value as the value for C.

There are an infinite number of Julia sets, one for each point in the complex plane. For the Julia set corresponding to a given complex number, C is set to that number. Then, for each coordinate in that Julia set, z(0) is set to that coordinate value and the series is computed.

The connection between the Mandelbrot set and the many Julia sets, beyond using the same z-series, is that Julia sets that are the most interesting correspond to points just outside the Mandelbrot set (the black part).

For more in-depth information about fractals, see the sci.Fractals FAQ.

Status Bar

The status bar at the bottom of the window shows data for the fractal image. The data in the status bar is also shown in the Fractal Statistics dialog, where it is also possible to change the values.

The contents of the status bar, from left to right, are:

  • Center Point -- the coordinate (in the complex plane) that's in the center of the window.
  • Zoom Factor -- how magnified the image is.
  • Iterations -- the maximum number of iterations used for calculating the set.
  • Color Cycle Size -- the number of iterations per loop around the color wheel; the higher the value, the more gradual the color change.
  • Starting Hue Value -- this represents the starting location in the color spectrum as colors are assigned.

Fractal Statistics Dialog

The Fractal Statistics dialog can be accessed from the Edit/Fractal Stats... menu command or by hitting F2. It shows the current settings for the fractal parameters and allows those values to be changed.

The controls in the dialog are:

  • Center -- the x and y values for the point (in the complex plane) that's in the center of the window.
  • Iterations -- the maximum number of iterations used for calculating the set.
  • Zoom -- how magnified the image is; affects Unit (pixel) size value.
  • Unit (pixel) size -- the width of a pixel (in complex coordinates); this is modified when Zoom is changed.
  • Color Cycle Size -- the number of iterations per loop around the color wheel; the higher the value, the more gradual the color change.
  • Starting Hue Value -- this represents the starting location in the color spectrum as colors are assigned.
  • Value for C (when a Julia set is displayed) -- this is the value used for C when iterating to find each pixel value; see Calculating Fractals for details.

Use the spin controls to change values for Iterations, Zoom, Color Cycle Size, and Starting Hue Value.

If you exit the dialog using the OK button, the new values will be applied and the fractal will be recalculated. If you exit with the Cancel button, any changes will be lost and the original image will be unchanged.

Menu Commands

File commands

Note: the data (.fct) files written by Fractal Generation Program can be read by both the Windows and Macintosh versions of the program.

Open... (Ctrl+O) -- prompts for a file to open; you can specify any .fct or .bmp written by this program or a .fct written by the Macintosh version.

Save Data... (Ctrl+S) -- saves image information to a data (.fct) file; the current image can be regenerated in the future by opening that file.

Save Bitmap... (Ctrl+Shift+S) -- creates a bitmap (.bmp) file that can be opened by other applications; also saves the fractal data in the file so it can be read with File/Open.

Save For Desktop... -- creates a bitmap (.bmp) file that is the size of the screen (desktop), and optionally sets the bitmap as your desktop pattern.

Exit -- exits the program.

Edit commands

Undo (Ctrl+Z) -- returns to the previous display, including changing center point, zoom, iterations, color change rate, starting hue, and fractal set (Mandelbrot or Julia); does not affect the window size or location.

Redo (Ctrl+A) -- re-applies changes to the display, including changing center point, zoom, iterations, color change rate, starting hue, and fractal set (Mandelbrot or Julia); does not affect the window size or location.

Copy (Ctrl+C or Ctrl+Ins) -- places a copy of the current image on the clipboard (in bitmap format).

Fractal Stats... (F2) -- brings up the Fractal Statistics dialog, where you can view and change the values for the fractal image.

View commands

Shift Hue Left (left arrow) -- changes the starting hue value in the color spectrum; this will shift all colors 60 degrees counterclockwise around the color wheel (red goes to magenta, magenta goes to blue, etc).

Shift Hue Right (right arrow) -- changes the starting hue value in the color spectrum; this will shift all colors 60 degrees clockwise around the color wheel (red goes to yellow, yellow goes to green, etc).

Faster Color Change (up arrow) -- adjusts the coloring in the image to have a larger change in color as the iteration value changes; this tends to provides more colors in the image.

Slower Color Change (down arrow) -- adjusts the coloring in the image to have a smaller change in color as the iteration value changes; this tends to provide fewer colors in the image.

More Iterations (>) -- increases the iteration limit; this will provide more detail in areas that are black, but increases calculation time.

Fewer Iterations (<) -- decreases the iteration limit; this will speed up calculations, but provides less detail in the image.

Zoom In (+ or Left Click) -- enlarges the image and resets the center coordinate to the location clicked.

Zoom Out (- or Right Click) -- shrinks the image and sets the center coordinate to the location clicked.

Julia Set (Shift + Left Click) -- displays the Julia set corresponding to the (Mandelbrot) coordinate currently in the center of the screen. (This command only appears on the menu when the current set is the Mandelbrot set.)

Mandelbrot Set (Shift + Left Click) -- displays the Mandelbrot set centered at the coordinate used for the current Julia set. (This command only appears on the menu when the current set is a Julia set.)

Reset -- resets the center point, zoom, iterations, color change rate, and starting hue to default values for the current set; does not affect the window size or location.

Help commands

About the Mandelbrot Set -- shows a description of the calculations involved in displaying the Mandelbrot set.

About the Julia Sets -- shows a description of the calculations involved in displaying the Julia sets.

About this Program (F1) -- shows a dialog with version information and basic usage information.

Keyboard Shortcuts

Key Action
Ctrl+O Open a file (.fct or .bmp)
Ctrl+S Save a data file (.fct)
Ctrl+Shift+S Save a bitmap file (.bmp)
Ctrl+Z Undo image change
Ctrl+A Redo image change
Ctrl+C Copy current image to clipboard
Ctrl+Ins Copy current image to clipboard
F1 Show Help/About dialog
F2 Edit fractal statistics
Key Action
left arrow Shift hue left
right arrow Shift hue right
up arrow Faster color change
down arrow Slower color change
> More iterations
< Fewer iterations
+ Zoom in
- Zoom out

Tip: you don't need to use shift for + < or >. Just press the appropriate key.

 
©2000-2024 Idle Loop Software Design, LLC. You may not copy or reproduce any content from this site without our consent.