Implemented new algorithm used to draw the graph, preparing for smooth scaling.