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

Comparing ray/src/gen/genmarble.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:04:39 1991 UTC vs.
Revision 2.5 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   *  genmarble.c - generate a marble with bubbles inside.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9  
10   #include  <stdio.h>
11  
12 < #include  "random.h"
12 > #include <stdlib.h>
13  
14 + #include  <math.h>
15  
16 + #include  "random.h"
17 +
18   #define  PI     3.14159265359
19  
20   typedef double  FVECT[3];
# Line 26 | Line 26 | main(argc, argv)
26   int  argc;
27   char  **argv;
28   {
29        double  atof();
29          char  *cmtype, *cname;
30          FVECT  cent;
31          double  rad;
# Line 73 | Line 72 | bubble(v, cent, rad, bubrad)   /* compute location of ra
72   FVECT  v, cent;
73   double  rad, bubrad;
74   {
76        double  sqrt();
75          double  r, ro, theta, phi;
76  
77          r = frandom()*bubrad;
# Line 90 | Line 88 | sphere_cart(v, ro, theta, phi) /* spherical to cartesi
88   FVECT  v;
89   double  ro, theta, phi;
90   {
93        double  sin(), cos();
91          double  d;
92          
93          d = sin(phi);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines