type (GPOINT3), intent(in) :: plane(3),light, real, intent(out) :: a3(16)
Arguments
plane
Array of three points representing a planar surface
light
Position of light source
a3
3D viewing transformation matrix
Description
The routine gCreatePlanarShadowMatrix() constructs a 4x4 viewing transformation matrix required to generate a squashed view of a scene as per a shadow on a planar surface. The planar surface is represented by the three points passed in plane (from which a normal is calculated) and the position of the light source is passed in the GPOINT3 structure light.
In order to create the shadow, the returned matrix a3 should be passed to the routine gModifyView(), after which all the objects in the scene should be redrawn in black or a suitably dark, slightly transparent, material.