--- ray/src/gen/gendaymtx.c 2014/10/26 17:37:34 2.18 +++ ray/src/gen/gendaymtx.c 2015/09/02 22:52:04 2.21 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: gendaymtx.c,v 2.18 2014/10/26 17:37:34 greg Exp $"; +static const char RCSid[] = "$Id: gendaymtx.c,v 2.21 2015/09/02 22:52:04 greg Exp $"; #endif /* * gendaymtx.c @@ -86,6 +86,7 @@ static const char RCSid[] = "$Id: gendaymtx.c,v 2.18 2 #include #include #include "rtmath.h" +#include "resolu.h" #include "platform.h" #include "color.h" #include "resolu.h" @@ -393,7 +394,13 @@ main(int argc, char *argv[]) break; case '5': /* 5-phase calculation */ nsuns = 1; - fixed_sun_sa = 6.797e-05; + fixed_sun_sa = PI/360.*atof(argv[++i]); + if (fixed_sun_sa <= 0) { + fprintf(stderr, "%s: missing solar disk size argument for '-5' option\n", + argv[0]); + exit(1); + } + fixed_sun_sa *= fixed_sun_sa*PI; break; default: goto userr;