A graphical interface to visualize tree operations, made in OCaml.
- It draws tree on an empty canvas, using the official
Graphics
OCaml library. I'm working on a way to parse trees and heaps from a text file.
opam
: necessary to build executable OCaml code.- dune : a composable build system for OCaml. Basically, it manages dependencies for us. You can get it through opam (the OCaml Package Manager) with :
opam install dune
Graphics
library : since OCaml 4.06, graphics is not part of the stdlib you get by downloading opam anymore. Install it using :
opam install graphics
- Clone the repository wherever you want :
git clone https://github.com/Esteban795/TreeViewer.git
- After you're done cloning it, head to the directory. There, you can test with the given example if everything is running correctly. First, open a terminal and type
eval $(opam env)
to make sure dune will be detected. You'll need to type this every time you start a new terminal, so avoid killing your terminal each time !
- Then, you can just run
dune exec ./test/TreeViewer.exe
- Known issue : can't represent big trees, for the simple reason that the screen is static and just can't move.
- Known issue : can't resize without losing the displayed tree. (might have to go the SDL route ?)