Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Animation of graph drawing

Paul W Lee
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I'm going to implement a animation application that can automatically drawing some graphs. The scenario is like the following:
1. draw a graph, for example a tree, which nodes are randomly located,
2. adjust the positions of the nodes by some rules.
I want to show the changing step by step. but after the initial drawing( 1st step), the changings in 2nd step won't be displayed, and there is only the final view.
The psudocode is like:
paint( Graphics g ){
draw_the_graph( Graphics g ):
draw_node(g, a_node )
draw_edge(g, an_edge )
//do iteration to adjust all the nodes
for all the nodes:
//iteration finish
Any one can help me?
Thank you in advance.
[ May 01, 2004: Message edited by: Paul W Lee ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic