Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quadtree graphic display in Java

I'm writing a class in Java (Eclipse) which implements a quadtree structure. For those of you who are not familiar with this structure, it is simply a square that gets divided recursively into four other squares as shown in the figure below. QuadTree

I want to display the data structure as shown below. Does anyone have a nice idea for a simple implementation ?

Thanx

like image 942
kande Avatar asked Aug 27 '26 13:08

kande


1 Answers

You can use Java's AWT or Swing to create a window and draw the quad tree in there. For example, in Swing you could create a JPanel and do the drawing there. It does not need to be very complicated as it's only a matter of drawing lines and possibly squares.

like image 197
Simeon Visser Avatar answered Aug 29 '26 01:08

Simeon Visser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!