julia
make a plot a Julia set
julia -help
or
julia [-width integer] [-height integer] [-maxit integer]
[-levels integer] [-bail double] [-ulx double]
[-uly double] [-lly double] [-cr double] [-ci dou-
ble] [-box integer] [-bulx double] [-buly double]
[-blly double] [-idiv integer] [-rev] [-inv] [-mag
integer] [-term string]
Generates Julia sets, which are related to the Mandelbrot set. Has options similar to mandel.
A Julia set is drawn according to the specified parameters. The image is computed by iterating the complex equation z(t) = (z(t-1))^2 + c, where c = (cr + ci) is the complex point that determines which Julia set is being computed and z = (x + yi) corresponds to an (x, y) screen coordinate with the initial value of z(0) = 0. If the system diverges at time k (i.e., |z(k)| > BAIL) then a point at (x, y) is plotted with the grayscale color (k / IDIV + (k % IDIV) * (LEVELS / IDIV)) % LEVELS), which reduces to (k % LEVELS) with an IDIV of 1.
Colors
The four permutations of using or not using -rev and -inv will yield four different coloring schemes. Try it and see.
Miscellany
The method for choosing the viewable region may seem counter-intuitive at first, but it has some nice properties. In particular, selecting the exact (x, y) coordinates for the upper-left corner and only selecting the lower right y coordinate forces both the x and y scales to be identical since all scales are uniquely determined by these values along with the plot width and height. If you then change the width or height of the plot, the relative scales will still match up. The options for making a box work similarly.
Bugs
No sanity checks are performed to make sure that any of the options make sense. In particular, the bounding corners can be screwed up, and division by zero can occur with a malicious setting of IDIV.
Options
-width | Width of the plot in pixels. | 640 |
-height | Height of the plot in pixels. | 480 |
-maxit | Maximum number of iterations before automatic bailout. | 160 |
-levels | Number of plot (gray) levels to use. | 256 |
-bail | Value of |z| to end iteration, i.e., the bailout value. | 16.0 |
-ulx | Upper-left corner x-coordinate. | -2.0 |
-uly | Upper-left corner y-coordinate. | 1.5 |
-lly | Lower-left corner y-coordinate. | -1.5 |
-cr | Real component of c. | 0.3 |
-ci | imaginary component of c. | 0.6 |
-box | Line width for a box. If zero, no box is drawn. | 0 |
-bulx | Box's upper-left x-coordinate. | 0.0 |
-buly | Box's upper-left y-coordinate. | 0.0 |
-blly | Box's lower-left y-coordinate. | 0.0 |
-idiv | Iteration divisor. When greater than one, this creates a banding effect. | 1 |
-rev | Reverse all colors but first? | False |
-inv | Invert all colors? | False |
-mag | Magnification factor. | 1 |
-term | how to plot points | None |