Start to break code out of DynamicPolygonVisualizer so that it can be reused in other visualizers.