Abstracts the SVG generation so it can be used for algorithm execution.