diff options
| -rw-r--r-- | README.md | 29 | ||||
| -rw-r--r-- | src/fractals.c | 2 |
2 files changed, 30 insertions, 1 deletions
@@ -17,9 +17,36 @@ To build all versions simply run make ``` +If you wish to compile with additional floating point precision, add `-DEXTENDED_PRECISION` to `CPPFLAGS` in the makefile. + +**NOTE:** extended precision is **NOT** supported in the cuda version. + ### Running -## Animations +Any version of the program can be used to generate a visualizer compatible `.grid` file. +All versions of the program support the same command line arguments +The performance flag outputs information in the format of `<PROGRAM>,<FRACTAL>,<RUNTIME>`. +Note that the runtime is an average runtime from multiple runs. +The number of runs can be adjusted directly in `src/fractals.c` in `NUM_RUNS` or passed set in `CPPFLAGS` by adding `-DNUM_RUNS=N` + +``` +Usage: PROGRAM [-v] [-i iterations] [-x x_res] [-y y_res] [-z magnification] [-l lower_left] [-u upper_right] [-o output_grid] -f fractal +Options: + -i, --iterations <value> the number of iterations (default: 100) + -x, --x-res <value> the horizontal resolution (default: terminal width) + -y, --y-res <value> the vertical resolution (default: terminal height) + -l, --lower-left <value> Set the lower left corner of the fractal area (default: -2-2i) + -u, --upper-right <value> Set the upper right corner of the fractal area (default: 2+2i) + -z, --magnification <value> Set the magnification factor (default: 1) + -o, --output <filename> the output filename (default: fractal.grid) + -f, --fractal <type> the fractal type (default: mandelbrot) + supported fractals: mandelbrot, tricorn, multibrot, multicorn, burning_ship, julia + -p, --performance print performance info + -v, --verbose verbose output + -h, --help prints this help message +``` + +## Visualizations ## Presentation diff --git a/src/fractals.c b/src/fractals.c index be8c917..6b4c67a 100644 --- a/src/fractals.c +++ b/src/fractals.c @@ -10,7 +10,9 @@ #include "precision.h" #include "fractals.h" +#ifndef NUM_RUNS #define NUM_RUNS 5 +#endif void print_usage(FILE* file, const char* program_name){ fprintf(file, "Usage: %s [-v] [-i iterations] [-x x_res] [-y y_res] [-z magnification] [-l lower_left] [-u upper_right] [-o output_grid] -f fractal\n", program_name); |
