--- ray/src/gen/genmarble.c 1991/11/12 17:04:39 2.1 +++ ray/src/gen/genmarble.c 2003/06/08 12:03:09 2.6 @@ -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: genmarble.c,v 2.6 2003/06/08 12:03:09 schorsch Exp $"; #endif - /* * genmarble.c - generate a marble with bubbles inside. * @@ -12,21 +9,24 @@ static char SCCSid[] = "$SunId$ LBL"; #include -#include "random.h" +#include +#include +#include "random.h" + #define PI 3.14159265359 typedef double FVECT[3]; -double bubble(); /* pretty cute, huh? */ +static double bubble(); /* pretty cute, huh? */ +static void sphere_cart(); main(argc, argv) int argc; char **argv; { - double atof(); char *cmtype, *cname; FVECT cent; double rad; @@ -68,12 +68,11 @@ char **argv; } -double +static double bubble(v, cent, rad, bubrad) /* compute location of random bubble */ FVECT v, cent; double rad, bubrad; { - double sqrt(); double r, ro, theta, phi; r = frandom()*bubrad; @@ -86,11 +85,11 @@ double rad, bubrad; } +static void sphere_cart(v, ro, theta, phi) /* spherical to cartesian coord. conversion */ FVECT v; double ro, theta, phi; { - double sin(), cos(); double d; d = sin(phi);