000%

Interactive Graph Visualization

<!-- Drawing graphs with Java, from data structures to node placement. -->

&Role

  • * Developer ยท Group Project

&Stack

  • * Java
  • * Swing
  • * Git
  • * Graph Algorithms
  • * Data Structures

&Year: * 2025

&Type: * Education

I worked on this project with another student during my studies at the IUT de Bordeaux. We started from code provided for the course, including a Java Swing interface, and worked on the graph structures and the algorithms behind the drawing.

We used two ways to store a graph: adjacency lists and an adjacency matrix. Both have the same interface, so the rest of the program can use either one. This made the difference between the two more concrete for me, because the same operation does not involve the same work depending on how the graph is stored.

For the drawing, I worked on an algorithm based on forces. The idea is to treat the links like springs: connected nodes attract each other, while the nodes push each other apart. A small force pulls them towards the centre, and their movements get smaller over the iterations. We also added automatic sizing, so each node grows according to the space around it.

For me, this project was about connecting the data structures we saw in class to something visible. A graph is easier to understand when you can see how its nodes and links fit together.

Highlights

@Graph structures

Two ways to store the same graph: adjacency lists and an adjacency matrix using BitSet.

@Node placement

Connected nodes attract each other, while the nodes push each other apart to spread out the drawing.

@Node size

The size of each node adjusts to the space available around it.