Do following steps: 1. Create a undirected graph 2. Create an arc such as V0 -> V1 3. Now start bfs / dfs from V1 4. Normally the line will reverse itself to suit the animation from v1 to v0 5. After the animation change the graph to directed graph 6. Now the arc added before points from v1 to v0 7. Start bfs / dfs from V0 8. Now the line won't grow from V0 to V1, instead it grows from V1 to V0 --------- Will be fixed soon.