There are some basic design rules you should keep to when developing new visualization functions.

Introducing a new geometric primitive class, you should keep in mind the following:

Collections of geometric primitives

Visual::Container is an abstract geometric primitive which can hold any number of other geometric objects of arbitrary types (or anonymous arrays thereof) along with default values for their decoration attributes. As long as supplemental methods are expected to be called on the collection, it is kept together. As the container object eventually comes into the mouth of the visualize function, it simply opens itself and hands over the elements contained in it as if they were passed to visualize separately. Deriving application-specific classes from Visual::Container you can easily control which supplemental methods can be called for various "basic" types of pictures.

A Visual::Container object can be created with a constructor call:

$C=new Visual::Container( Name => "name", defaults => { Attribute => "Value", ... }, $vis_object1, $vis_object2, \@array3, ... );

Elements can be appended later as well:

push @{$C->elements}, new Visual::MyClass(...);