From 8279af3c8b3916f27067d004e9c6130d03f8359e Mon Sep 17 00:00:00 2001 From: JP Appel Date: Thu, 25 Apr 2024 19:38:57 -0400 Subject: updated readme with grid generator usage --- README.md | 29 ++++++++++++++++++++++++++++- src/fractals.c | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fde1a58..115197d 100644 --- a/README.md +++ b/README.md @@ -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 `,,`. +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 the number of iterations (default: 100) + -x, --x-res the horizontal resolution (default: terminal width) + -y, --y-res the vertical resolution (default: terminal height) + -l, --lower-left Set the lower left corner of the fractal area (default: -2-2i) + -u, --upper-right Set the upper right corner of the fractal area (default: 2+2i) + -z, --magnification Set the magnification factor (default: 1) + -o, --output the output filename (default: fractal.grid) + -f, --fractal 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); -- cgit v1.2.3