+static void
+cache(void) /* jwz */
+{ /*needs to be run once. Could easily be */
+ int i; /*reimplemented to run and cache at compile-time,*/
+ double dA;
+ for (i=0; i<PI_2000; i++)
+ {
+ dA=sin(((double) (random() % (PI_2000/2)))/1000.0);
+ /*Emulation of spherical distribution*/
+ dA+=asin(frand(1.0))/M_PI_2*0.1;
+ /*Approximating the integration of the binominal, for
+ well-distributed randomness*/
+ cos_cache[i]=-abs((int) (cos(((double)i)/1000.0)*dA*ydelta));
+ sin_cache[i]=(int) (sin(((double)i)/1000.0)*dA*xdelta);
+ }
+}
+
+void init_particle(PARTICLE* particle, signed short iColorCount, unsigned short xcenter, unsigned short ycenter)