Skip to content

mhhollomon/mandel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandel

My take on the fractal coloring genre

A set of tools to evaluate and color fractal sets.

Building

cmake -S . -B build
cmake --build build

The executables will be in the new build directory.

Programs

fractalator

A CLI for evaulating point on the complex number plane for fractal set inclusion. Currently, the only fractal supported is the Mandelbrot set.

fractalator writes an output file with the results of the evaulation. This file can then be used with the colorator utiltiy (see below).

command line

fractalator <general arguments> <bounding box arguments> <sampling arguments>

general arguments

-h, --help
Print out short command line help text
-o, --output-file <filename>
path to file into which the output will be written. If the file exists, it will be truncated.
-j, --jobs <jobcount>
Number of parallel threads use for computing. If 0 is given or if the the options is not on the command line, the engine will use a strict sequential code path. If <jobcount> is 1, the parallel path will be used, but only one calculating thread will be used. This can actually be slower than 0. If <jobcount> is greater than 1, then that many threads will be used.
-l --limit <limit>
Integer number of iterations of the fractal formula to use to decide if the results will diverge or not.
-e, --escape <radius>
Value to use to test if the point has diverged. Default is 256.0

bounding box arguments

There are multiple ways to define the part of the complex plane that will be used.

  • Direct - specify the bounding box's top left and bottom right points using --ltr,--lti,--rbr,--rbi. This is the base case. Internally, all other ways to define the bounding box are reduced to this.

  • Center - use --cr,--ci to specify the center of the box and --box to specify the length of the sides. Note that the box specified this way will necessarily be a square.

  • Aspect - Use --ltr,--lti to specify the top right of the box, --box to specify the length of the real axis and --aspect to give sampling. In this case, the real axis will be the length given by --box. The imaginary axis will be a scaled length of the ratio of given by aspect. --ltr 1.0 --lti 1.0 --box 0.5 --aspect 1920x1080 is equivalent to --ltr 1.0 --lti 1.0 --rbr 1.5 --rbi 0.71875 --width 1920 --height 1080

--ltr <number>
real coordinate for the left top point of the bounding box
--lti <number>
imaginary coordinate for the left top point of the bounding box
--rbr <number>
real coordinate for the right bottom point of the bounding box
--lti <number>
imaginary coordinate for the right bottom point of the bounding box
--cr <number>
real coordinate for the center of the bounding box
--ci <number>
imaginary coordinate for the center of the bounding box
--box <number>
When used with --cr,--ci, this is the length of the side for bounding box. When used with --aspect, this is the length of the real axis for the bounding box.

sampling arguments

These arguments control the number of points along each axis that will be sampled by the algorithm.

-s, --samples <n>
Number of samples to use on both axis, equivalent to --width n --height n
--width <n>
Number of samples to use on the real axis
--height <n>
Number of samples to use on the imaginary axis
--aspect <WxH>
Number of samples to use. Equivalent to --width W --height H but also controls the actual height of the bounding box (See above).

colorator

Applies a user supplied coloring algorithm to the input fractal data to create a .bmp image file.

The coloring algorithm is written in angelscript.

See the scripting documentation for further details on the interface. See the samples directory for examples.

command line

colorator [-h] -o <output> -i <input> -s <script> -a <argstring>

-h, --help
Print out short command line help text
-o, --output-file <filename>
path to file into which the output will be written. If the file exists, it will be truncated.
-i, --input-file <filename>
Path to .fract file on to which to apply coloring. It assumes the file format is that put out by fractalator.
-s, --script-file <filename>
Path to the angelscript file containing coloring algorithm.
-a, --args <argstring>
semi-colon separated list of key/value pairs that will be passed to the script. see [scripting documentation](docs/scripting.md) of further details

mandel

mandel combines fractalator and colorator, but with a small bit of smarts. mandel checks the parameters encoded in the fractalator output. If they are the same, then only the coloring pass is run. If they are different, then both will be run. This allows you to fine tune the coloring while still having the felixbility to slightly tweak the fractal while only doing what is required.

command line

The options to mandel are mostly a straight combination of the fractalator and colorator parameters. Differences are noted below.

-o, --output-file <filename>
This is the path prefix for both the .fract file and the image file. If <filename> is `/somedir/foo` ,then the .fract file will be `/somedir/foo.fract` and the image file will be `/somedir/foo.bmp`
-s, --samples
Like the fractalator option
--script <filename>
Same as the (-s, -script-file) options to colorator

gmandel

Hypothetical future version of mandel but with a gui interface.

Technologies

License

MIT © 2020 Mark Hollomon

Releases

No releases published

Packages

No packages published