Drop shadows add to the realism of the 3D animation are relatively easy to do.
Drop shadows have been implemented as additional objects, grey in colour, which are parallel transformations of obj elements onto the y=0 plane. Clearly this is quite a crude addition but if used sparingly and with careful positioning of the sun, can be effective.
An additional element is added as a child of the scenes element:
<shadow><over>50</over><up>-40</up></shadow>
This defines the position of the sun relative to the origin of the scene. All obj elements will have a drop shadow object added unless it has the additional attribute drop="no". This stops unnecessary drop shadows being added. This transformation is applied before def_perspective_scenes and just adds to the set of objects to be rendered.
java -jar saxon9.jar t4.xml library/add_drop_shadow.xsl > t5.xml java -jar saxon9.jar t5.xml library/def_perspective_scenes.xsl > t6.xml java -jar saxon6.jar -o t7.xml t6.xml library/change_accuracy.xsl decplaces=1 java -jar saxon6.jar -o scene07_out.svg t7.xml library/back_to_svg.xsl mode=relMabs lastl=no java -jar saxon9.jar scene07_out.svg library/animate_scenes_with_shadows.xsl > scene07_animated.svg opacity=0.1
A separate animate_scenes_with_shadows transformation has been added. The major difference is that it gives the option of defining the opacity of the drop shadow.