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

Comparing ray/src/gen/genworm.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:04:53 1991 UTC vs.
Revision 2.5 by schorsch, Mon Jul 21 22:30:18 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
4
5 /* Copyright (c) 1989 Regents of the University of California */
6
4   /*
5   *  genworm.c - program to generate worms (strings with varying thickness).
6   *
# Line 15 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12   */
13  
14   #include  <stdio.h>
15 <
15 > #include  <math.h>
16   #include  "fvect.h"
17  
18   #define  XNAME          "X`SYS`"                /* x function name */
# Line 29 | Line 26 | static char SCCSid[] = "$SunId$ LBL";
26  
27  
28   double  funvalue(), l_hermite(), l_bezier(), l_bspline(), argument();
29 + void  quit();
30  
31  
32   main(argc, argv)
# Line 78 | Line 76 | char  *argv[];
76                  p[1] = funvalue(YNAME, 1, &t);
77                  p[2] = funvalue(ZNAME, 1, &t);
78                  r = funvalue(RNAME, 1, &t);
79 <                if (i)
79 >                if (i) {
80                          if (lastr <= r+FTINY && lastr >= r-FTINY) {
81                                  printf("\n%s cylinder %s.c%d\n",
82                                                  argv[1], argv[2], i);
# Line 105 | Line 103 | char  *argv[];
103                                  f = f <= 0.0 ? 0.0 : sqrt(f);
104                                  printf("%18.12g %18.12g\n", f*lastr, f*r);
105                          }
106 +                }
107                  printf("\n%s sphere %s.s%d\n", argv[1], argv[2], i);
108                  printf("0\n0\n4 %18.12g %18.12g %18.12g %18.12g\n",
109                                  p[0], p[1], p[2], r);
# Line 121 | Line 120 | userror:
120   }
121  
122  
123 + void
124   eputs(msg)
125   char  *msg;
126   {
# Line 128 | Line 128 | char  *msg;
128   }
129  
130  
131 + void
132   wputs(msg)
133   char  *msg;
134   {
# Line 135 | Line 136 | char  *msg;
136   }
137  
138  
139 + void
140   quit(code)
141 + int  code;
142   {
143          exit(code);
144   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines