Nathan Klee
                        etan@leland.stanford.edu

                        Peter J. Lorenzen
                        peterl1@leland.stanford.edu



For the emanations of our plasma ball, we utilize a hypertexture.  We
started with a function similar to the curly hair described in Ken
Perlin's SigGraph July '89 paper.  As opposed to using a softness value as
he described, we specify the outer radius of the sphere and the inner
radius as a percentage of that outer radius. 

We borrowed our noise function from him.  (We had to tweak the values to
get the right range, but the function is copied from CS248 which was
originally copied from him.)  We then changed the DMF (density modulation
function) to be density independent, and changed the gain and bias
functions, which are applied to the noise, according to the position of a
point in the hypersphere.  Points which came close to the outer surface
were fanned out by raising the bias.  We chose a very small bias and large
gain to make the range of values sparse for which the noise would cause
emanations.  (Thus giving us less hair.) 

For the coloring of the hypersphere, we noted that standard
shading/changing of the color of the emanations made it look too hair
like.  Since we were modeling light, we varied with transparency with the
density and kept the color value constant.  As we tranversed the
hypertexture, we accumulated opacity as opposed to color and then used
that for simulating fall-off for individual emanations. 

In order to integrate the hypertexture into our oct-tree scheme used for
our ray-tracer, we treat the hypertexture as a regular sphere of the size
of the outer radius.  Upon intersection with this sphere, we then switch
over to a ray marching scheme which traverses the hypertexture testing the
points using our modified DMF.  If there is an intersection with the
hypertexure, then we return that aggregate color and opacity, otherwise,
we make the hypersphere transparent, and recast the ray inside the
hypersphere as if it was refracted without an index of refraction, and use
what-ever that returns as the entire color value.  This caused us to treat
intersections which are coming from the inside of the hypertexture as
non-existent.  This allows us to show objects inside of the hypertexture
(as well as behind it), but unfortunately, internal objects don't receive
reflected rays from the actual hypersphere. 

Finally, in order to animate the hypersphere, we used two methods.  To do
the silly curling animation, we just varied the curliness multiplier used
in Perlin's curly hair DMF.  To simulate an actual plasma ball motion, we
used a variable value to slightly offset the y-component of the projected
points inside the hypersphere.  These points are used when we get the
noise value.  Since the noise function is continous and static, this
pertubation keeps coherancy in the emanations between animation frames. 

References:
 Perlin, Ken and Hoffert, Eric M., "Hypertexture", 
        ACM Press, Computer Graphics, Volume 23, Number 3, July 1989.

 Perlin, Ken, "An Image Synthesizer", ACM Press, Computer Graphics,
        Volume 19, Number 3, 1985.