[julia] make bailout and epsilon configurable
This commit is contained in:
parent
022e2cf2e1
commit
26ba0330b5
17
julia.c
17
julia.c
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define RITNUM(c, i) (c[i].it - c[i].rit)
|
#define RITNUM(c, i) (c[i].it - c[i].rit)
|
||||||
|
|
||||||
#define OPTSTRING "a:b:c:D:d:h:Ll:N:n:w:x:y:z:"
|
#define OPTSTRING "a:B:b:c:D:d:e:h:Ll:N:n:w:x:y:z:"
|
||||||
#define RADIAN 3.14159265358979323846L
|
#define RADIAN 3.14159265358979323846L
|
||||||
|
|
||||||
struct color contour_color = { 0 };
|
struct color contour_color = { 0 };
|
||||||
@ -105,10 +105,11 @@ iterate(long double complex z, long double complex c, long double *rit)
|
|||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Usage: %s julia [-L] [-a center_x] [-b center_y]\n"
|
fprintf(stderr, "Usage: %s julia [-L] [-a center_x] [-B bailout]\n"
|
||||||
" [-c contour] [-D displacement] [-d density] [-h height]\n"
|
" [-b center_y] [-c contour] [-D displacement] [-d density]\n"
|
||||||
" [-l light_intensity] [-N newton_iters] [-n iters]\n"
|
" [-e epsilon] [-h height] [-l light_intensity]\n"
|
||||||
" [-w width] [-x julia_x] [-y julia_y] [-z zoom]\n",
|
" [-N newton_iters] [-n iters] [-w width] [-x julia_x]\n"
|
||||||
|
" [-y julia_y] [-z zoom]\n",
|
||||||
xgetprogname());
|
xgetprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -144,6 +145,9 @@ julia_main(int argc, char *argv[])
|
|||||||
case 'a':
|
case 'a':
|
||||||
cen_x = parse_double(optarg);
|
cen_x = parse_double(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'B':
|
||||||
|
bailout = parse_double(optarg);
|
||||||
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
cen_y = parse_double(optarg);
|
cen_y = parse_double(optarg);
|
||||||
break;
|
break;
|
||||||
@ -156,6 +160,9 @@ julia_main(int argc, char *argv[])
|
|||||||
case 'd':
|
case 'd':
|
||||||
density = parse_double(optarg);
|
density = parse_double(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
epsilon = parse_double(optarg);
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
height = parse_integer(optarg, 1, INT_MAX);
|
height = parse_integer(optarg, 1, INT_MAX);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user