--- ray/src/gen/genblinds.c 1992/08/27 13:51:59 2.3 +++ ray/src/gen/genblinds.c 2003/02/22 02:07:23 2.9 @@ -1,9 +1,6 @@ -/* Copyright (c) 1986 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: genblinds.c,v 2.9 2003/02/22 02:07:23 greg Exp $"; #endif - /* * genblind2.c - make some curved or flat venetian blinds. * @@ -19,15 +16,12 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include +#include #include -#ifndef atof -extern double atof(); -#endif +#define PI 3.14159265358979323846 +#define DELTA 10. /* MINIMAL SUSTAINED ANGLE IN DEGREES */ -#define PI 3.141592653589793 -#define DELTA 5. /* MINIMAL SUSTAINED ANGLE IN DEGREES */ - double baseflat[4][3], baseblind[4][3][180]; double A[3],X[3]; char *material, *name; @@ -39,7 +33,6 @@ main(argc, argv) int argc; char *argv[]; { - double fabs(); double width, delem, depth, rcurv = 0.0, angle; double beta, gamma, theta, chi; int i, j, k, l; @@ -72,7 +65,7 @@ char *argv[]; /* HOW MANY ELEMENTARY SURFACES SHOULD BE CALCULATED ? */ - nsurf = (theta / ((PI/180.)*DELTA)); + nsurf = (theta / ((PI/180.)*DELTA)) + 1; /* WHAT IS THE DEPTH OF THE ELEMENTARY SURFACES ? */ @@ -156,7 +149,6 @@ userr: makeflat(w,d,a) double w, d, a; { - double sin(), cos(); double h; h = d*sin(a);