thanks, I love parabolae too. This was however

not my question. Im sorry, it appears I was unclear.

I've got the volumetric shadow-casting implemented

according to the Carmack-MJK email and it works

beautifully. Im now optimising the volume-calculations.

Quote:>I have the distinct feeling that this can be

>done much more efficiently, by generating

>a projection matrix that does the same job

>for a standard-sized cylinder located at the

>position of any sphere. say:

I meant to say, it should be possible to derive from

the position and radius of a sphere with the

position of the lightsource a matrix that transforms

a 'unit' capped cylinder in such a way that the

transformed cylinder is indentical to the shadow

volume of a sphere with the top-cap going through

the center of the sphere, scaled to it's diameter

and oriented in the plane with normal ( light - sphere )

the lower cap should be coplanar and below the actual 'floor'

that eventally catches the shadow. Degenerate cases can be

avoided by f.i. restricting the lightsource to be above the actual floor

and a minimum distance away from the surface of the sphere. In

my case this wouldnt be a problem at all. If such a matrix can be derived,

the shadowvolume for a sphere can be stored in a display list and

transformed

by the matrix which we have to calculate. right now, I'm 'hand-calculating'

every vertex which is too slow and worse, compared to the beauty of

'Carmack's reverse' ( no pun intended ) it is sloppy.

thanks,

Jonathan

-------------------------------------------------------------

please tear the sticker off my eddress before use

-------------------------------------------------------------

> >Unfortunately, Im not much of a mathwiz, I might

> >be able to figure it out eventually, but maybe its

> >already available and perhaps someone has something

> >similar just lying around, I'd love to hear from you...

> Would it help if I tell you the shadow cone will have radius r at

> distance sqrt(||C-L||^2 - r^2) along its center line? Where L is the

> position of the light, C the center of the sphere, and r the sphere

> radius. The center line of the cone is, as you noted, parallel to C-L.

> From that you can write an equation for the cone. Then you can take

> the data for the plane and find the conic of intersection. If you're

> lucky that shadow will be an ellipse; however you can also get highly

> elongated shadows in the shape of a parabola or hyperbola if the plane

> is tilted enough with respect to the cone. Since these last two cases

> are unbounded regions, the shadow areas are infinite. You can also get

> degenerate cases; the ellipse can shrink to a point, and the hyperbola

> can become a wedge.

<http://id.mind.net/~zona/mmts/miscellaneousMath/conicSections/conicSe...

.htm>

Quote:> Conics have been popular every since Apollonius of Perga.

> <http://www-gap.dcs.st-and.ac.uk/~history/Mathematicians/Apollonius.html>

> Search the web and you will find an abundance of material to help you.