--- ray/src/gen/genmarble.c 1991/12/19 15:08:34 2.2 +++ 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,17 +9,18 @@ static char SCCSid[] = "$SunId$ LBL"; #include -#include "random.h" +#include -#ifndef atof -extern double atof(); -#endif +#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) @@ -70,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; @@ -88,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);