Shadows and Plane equations

I have two questions to post: first, if I know a point in a plane and the plane normal how can I generate the A,B,C, and D values of the equation that describes the plane (AX+BY+CZ+D = 0)? And how can I generate shadows in that plane knowing the A,B,C, and D values?
if you know a site which has a shadow tutorial please tell me…

thanks very much

Suppose the P(XP,YP,ZP) is a point in the plane and N(XN,YN,ZN) is the normal, the equation will be:


Now, if we solve for D after substituting P coordinates in the equation we get:


Where the dot (.) is the dot product operator for vectors.

As for generating shadows, I didn’t try it yet, but, to generate the shadow of an object you project it on the plane of the ground before you project it on the plane of the screen. That involves calculating a projection matrix that will be multiplied with the model view matrix befor rendering the object. Search this site for how to use stencil buffers. There are some slides that illustrate this technique and other techniques like generating reflections.

thanks a lot! I looked in some tutorials and found the projection matrix that generates shadows. And the equation works very well