ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/genblinds.c
(Generate patch)

Comparing ray/src/gen/genblinds.c (file contents):
Revision 2.3 by greg, Thu Aug 27 13:51:59 1992 UTC vs.
Revision 2.9 by greg, Sat Feb 22 02:07:23 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  genblind2.c - make some curved or flat venetian blinds.
6   *
# Line 19 | Line 16 | static char SCCSid[] = "$SunId$ LBL";
16   */
17  
18   #include  <stdio.h>
19 + #include <stdlib.h>
20   #include  <math.h>
21  
22 < #ifndef atof
23 < extern double  atof();
26 < #endif
22 > #define  PI             3.14159265358979323846
23 > #define  DELTA          10.  /*  MINIMAL SUSTAINED ANGLE IN DEGREES */
24  
28 #define  PI             3.141592653589793
29 #define  DELTA          5.  /*  MINIMAL SUSTAINED ANGLE IN DEGREES */
30
25   double  baseflat[4][3], baseblind[4][3][180];
26   double  A[3],X[3];
27   char  *material, *name;
# Line 39 | Line 33 | main(argc, argv)
33   int  argc;
34   char  *argv[];
35   {
42        double  fabs();
36          double  width, delem, depth, rcurv = 0.0, angle;
37          double  beta, gamma, theta, chi;
38          int     i, j, k, l;
# Line 72 | Line 65 | char  *argv[];
65  
66          /* HOW MANY ELEMENTARY SURFACES SHOULD BE CALCULATED ? */
67  
68 <        nsurf = (theta / ((PI/180.)*DELTA));
68 >        nsurf = (theta / ((PI/180.)*DELTA)) + 1;
69  
70          /* WHAT IS THE DEPTH OF THE ELEMENTARY SURFACES ? */
71  
# Line 156 | Line 149 | userr:
149   makeflat(w,d,a)
150   double  w, d, a;
151   {
159        double  sin(), cos();
152          double  h;
153  
154          h = d*sin(a);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines