Stencil shadow drawing?

BlitzMax Forums/BlitzMax OpenGL Programming/Stencil shadow drawing?

When creating the closed volume to project the shadow it looks like the common edge of top of the can and of the back of the can have made 1 linked volume? and to make this a closed loop to project the edge of the volume has had to go into itself.

Lets see if i can do some ascii art to represent it. :)

xxxxxxxxxxx
x00000xx00x
x00000xux0x
x0000xuux0x
x000xuuux0x
x000xxxxx0x
x000000000x
xxxxxxxxxxx

the section where the '0' are would be the volume projected by the back of the can,

the section where the 'u' are would be the volume projected but the lit section on top of the can.

the 'x' are the outline.

because these have a common edge have these volumes linked to become one volume, thus when the outline is generated it has to follow the 'x' round. The 'u' area then is outside the shadow volume.

I havent tried shadows myself yet and what i've just typed is general stuff i've just picked up from articles on gamedev.net and nvidia developer section so please correct me if im talking nonsense:)