The basic architecture of the 3D part of the path_ology library is as follows:

No SVG Support

Figure 2.1: 3D Path_ology

The SVG file includes a metadata section that defines the keyframes for the animation in 3D.

A defs section defines the paths to be used in the scenes. These paths are transformed into XML by the usual XML path_ology transformation. The major addition to the defs section is that paths can be defined in 3D as well as 2D.

The main 3D functions are:

  • add_z: just adds z=0 to every 2D path description
  • def_perspective_scenes: applies a perspective transformation to the scene definitions to generate a 2D view of each scene
  • add_drop_shadow: drop shadows can be added to objects in the scene
  • animate_scenes: this takes the individual keyframes and generates the appropriate SVG animate elements