The basic architecture of the path_ology library is as follows:

No SVG Support

Figure 2.1: Basic Architecture

Most of the library functions in path_ology take the internal XML form of each path in the SVG file and apply a transformation to it. Examples are changing from absolute to relative and changing accuracy.

These basic transformations are applicable to any SVG file. Additionally there are a set of transformations that make the definition of animation scenes easier. Effectively, it allows the user to define a set of key frames to be animated between. Finally, to enhance the animation possibilities are a set of functions that allow animations to be defined in 3D and rendered in 2D via a perspective transformation. To make the definition of 3D figures easier, enhancements are provided to the 2D path element to make 3D scene definitions easier.

Internal XML Form

Getting an internal XML form appropriate to the d attribute of the SVG path is not easy and over the life of the path_ology library, several variations have been tried. The problems come partly from the rather vague definition in the SVG specification as to what comprises a subpath. Also, the shorthands overload the functions of both the M and Z commands. Finally, the ability to mix open and closed subpaths within a single SVG path causes problems, particularly if there is a need to reverse the path description. The current internal XML form attempts to address these issues.