[comp.graphics] fast shadows?

marcc@yoyodyne.ncsa.uiuc.edu (Marc Cooper) (01/05/91)

ok..  There are probabaly references in the FAQ for this, but I can't get to
the FAQ at present, so I'll ask...

I was looking at the SGI demo program "Jello" the other day, and noticed that
neat little shaddow the blob of jello casts on the bounding box.  It struck me
that this would be a really neat feature to put in a program I'm working on
which involves displaying a variety of polygonal objects in a bounding box.

Now, my light source isn't directly overhead, but it is infinite.  So, if
I needed to project the shadow of an object, the matrix

1    0    0    0    (x,y,z) is direction of light
x/y  0    z/y  0
0    0    1    0
0    0    0    1 

would work nicely if I only had to worry about the shadow on the "ground" 
(the y=0 plane).  Alas, I need to worry about it on walls, and a "ground" that
is constantly tilting.  Is there an quick way to take these more general cases
into account?  I know it would require testing at most three planes to see if 
they intersect with the projection. Is there a fast way to do it?  
This is one of those things that would be nice to have, but if it degrades
the performance of the program too much, I'd just as soon leave it out..

any ideas, questions, comments are welcome..

--
Marc Cooper		| "In my childhood, I WAS an imaginary playmate."
marcc@ncsa.uiuc.edu	|	-Tom Robbins, EVEN GOWGIRLS GET THE BLUES

		National Center for Supercomputing Applications

Disclaimer:	"It's mine! All mine!"  -D. Duck