The root generation and the heatmap generation can be split into two completely separate processes so I'm working on that now.
This means the roots could be calculated once for a particular degree without having to do it over and over again for different image resolutions.