Animated texture on a torus


I need draw a graph (with edges and vertices) on a torus and then animate a path on it from point x to point y, while coloring visited edges/vertices as the path progresses.

Is this possible to do with Blender, or would some other tool be better?

check into ‘dynamic paint’