| Graph animation with ILOG Views 2D Graphics |
|
This demonstration shows an animated graph developed
with ILOG Views 2D
Graphics Professional. You can zoom, scroll, select objects, and move
them while the graph continues to be animated.
The goal of this demo is to show:
- Animation of structured 2D Graphics
- Nodes and links
- Selection
- Zoom and scroll
- Overview
- Layers
Downloading the demonstration
Please download the ZIP file for Window 95/98/NT/2000.
Please download the ZIP file for Window XP
Please download the ZIP file for Window XP (with GDI+)
No additional files will be downloaded to your hard disk.
Running the demonstration
This demonstration runs on PCs under Windows 98, Windows NT, Windows 2000 or Windows XP.
This application has nine buttons in the toolbar:
 |
Allows to select and move objects in the view. |
 |
Allows to scroll the view. The mouse wheel can
be used to zoom in or out. The same effect can be obtained by clicking
the right button of the mouse and moving the mouse up or down. |
 |
Shows or hides the nodes. |
 |
Shows or hides the links. |
 |
Changes the dataset and restarts the animation. |
 |
Zooms the view in. |
 |
Zooms the view out. |
 |
Allows to select a rectangle to zoom in. |
 |
Shows all data. |
You can also move the blue rectangle in the overview to control the view in the main window. |
 |
Technical highlights
Animation
The nodes and links are stored in a container of ILOG Views 2D Graphics. This
application contains a spring embedder algorithm that computes the new
positions of the nodes for animation. After each step, the container is
notified that some nodes have moved. Then, ILOG
Views 2D Graphics Professional:
- Computes automatically the new positions of the links
- Updates the main window and the overview
Zoom and pan
This application offers a variety of way to zoom and pan: buttons, dragging a rectangle, pan interactor, overview. All these operations are simply performed by changing the projection parameters of the view (the set of projection parameters is called a transformer).
In addition, user interaction capabilities (interactors) shown in this demonstration are actually predefined classes of the ILOG Views 2D Graphics class library, they are ready to use and can be included in an application with a single line of code.
Overview
The overview is a standard feature of ILOG Views 2D Graphics professional. This feature is simply created by connecting a second view to the container of ILOG Views 2D Graphics that stores the nodes and links. In addition, an overview interactor is set on this view to control the transformer of the main view.
Hiding nodes and links
The nodes and links are stored in different layers in the container of ILOG Views 2D Graphics. The buttons that show or hide the nodes and links control the visibility of these layers. The visibility of a layer can be set for each view. For instance, the nodes are not visible in the overview.
Zoomable and fixed-size objects
This demonstrations shows also two categories of objects.
- Zoomable objects that grow when the view is zoomed in, and
become smaller when the view is zoomed out. The nodes in the
"flower" and "circle" datasets are zoomable.
- Fixed-size objects that have always the same size. The nodes
in the "balls" dataset are fixed-size.
|