This is a library/application for visualizing geometry algorithms. Current in development.
There are different tools available. Tools can have left or right click functionality. Each can currently be selected by pressing the corresponding key:
- "S": Selection tool.
- "T": Translate tool.
- "Q": Draw a point.
- "W": Draw a line segment.
- "E": Draw a circle.
- "R": Draw a rectangle.
- "U": Find the convex hull of all points and draw it as line segments.
- "I": Find all the pairwise intersections of line segments and draw them as circles.
- "O": Find the convex hull of all circles and draw it as line segments.
- "`": Display the console history.
Other shortcuts:
- "CTRL+Z": Undo.
- "CTRL+SHIFT+Z": Redo.
- "CTRL+A": Select all.
- "SPACE+C": New empty page.
- "SPACE+V": Duplicate current page.
- "SPACE+D": Delete current page.
- "PAGE_UP": Previous page.
- "PAGE_DOWN": Next page.
- "SPACE+Z": Undo page change.
- "SPACE+SHIFT+Z": Redo page change.
- "ESC": Close the program.
Selected objects can be deleted with the delete button. The default colour of new geometric objects can be changed with the number keys.
This repo relies on a modified version of SIGIL (Sound, Input, and Graphics Integration Library). The modified version was developed in tandem with Geometry Vis. The original version of SIGIL is available here.
The installation instructions for SIGIL are quite outdated, so use these steps:
- Install OpenAL. On Ubuntu (18.04), the following should suffice:
sudo apt install libalut-dev
- Clone the modified SIGIL source code. This should also be possible with a simple
git submodule update --init --recursive
. - Build SIGIL according loosely according to the instructions from this thread (saved in wayback machine april 13 2020), which are as follows:
sudo apt install libfreetype6-dev libglew-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev
git clone https://gitlab.com/geoff-nagy/sigil.git sigil
cd sigil/deps/
git clone https://github.com/glfw/glfw.git glfw
mkdir ../build-linux-gcc
cd ..
cmake .
make
sudo make install
- Now also install GLFW:
cd sigil/deps/glfw/
cmake .
make
sudo make install
- To setup the shared library for the first time (actually allowing programs to run):
echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH