Implementations of Binary Space Parititoning and Sort Tile Recursive Partitioning algorithm.
Recursively divides the space into two parts until the leaf nodes satisfy the constraints such as minimum number of spatial objects in a partition.
g++ -std=c++0x bsp_3d.cpp -o bsp
./bsp testObj.mbb
Sort Tile Recursive Partitioning : Partitioning using RTree from libSpatialIndex.
https://github.com/libspatialindex/libspatialindex/wiki/1.-Getting-Started
g++ -std=c++0x helloLibSpatial.cpp -lspatialindex_c -lspatialindex -o helloLibSpatial
./helloLibSpatial
g++ -std=c++0x str_3d.cpp -lspatialindex_c -lspatialindex -o str
./str testObj.mbb
http://www.linuxjournal.com/content/introduction-opengl-programming
apt-cache search opengl
sudo apt-get install freeglut3 freeglut3-dev libglew-dev
sudo apt-get install mesa-utils
Check your OpenGL installation
glxinfo | grep OpenGL
Draw Triangle and Circle as a HelloWorld program.
g++ openGLHelloWorld.cpp -lglut -lGL -o hello
./hello
Draw Rotated Cube using OpenGL.
g++ openGLCube.cpp -lglut -lGL -lGLU -o cube
./cube
After trying several things in OpenGL, I found stackoverflow links directing to Matlab. The APIs were simpler and easy to implement. So, I implemented the partitioning algorithm visualizations in Matlab and not in OpenGL.
Run simplecube.m
The visualizations are for both BSP and STR partitioning algorithms.
BSP
Input for BSP visualization is
STR
Input for STR visualization is