Takes a planar graph with edge distances that is minimally rigid in 2D and a flex DR-plan (a recursive decomposition into minimally rigid, maximal proper subgraphs) as input, and a desired flip (orientation) of a 2D realization of the vertices as points that achieves the edge distances. Outputs the realization.
- CMake >=3.5.*
- Boost Graph Library
Use MinGW or vcpkg to integrate Boost with Windows. - Splinter for multi-variant interpolation.
Header files are included in./include/
.
Download the latest version of splinter library here. - Boost Libraries for libraries like Program Options.
- GNU Linear Programming Kit (GLPK) to solve the simplex of the cayley parameters.
- GraphViz (neato) to generate pictures from .dot files. (Optional)
-
git clone this repository.
-
Build
-
Windows
-
Visual Studio
- Download the
msvc
version of Splinter library. - Create a new folder to store the solution files.
- Use
cmake-gui
to generate Visual Studio project.
Manually specify the path to Splinter and GLPK in CMake. See the CMake options below. - Open the project in Visual Studio and build.
- Download the
-
JetBrains CLion
- Download the
win-gcc
version of Splinter library. - Directly open the
cmakelist.txt
as a project. - Open Settings -> Build, Execution, Deployment -> CMake.
- Add CMake Options, see the CMake options below.
- Download the
-
-
Linux
- Download the linux version of Splinter library.
- Use CMake to build.
cd build && cmake .. -DCMAKE_BUILD_TYPE={Debug/Release} -DSPLINTER_LIB="Path/to/libsplinter-static-*-*.a" -DGLPK_LIB="Path/to/libglpk.so"
- Make
-
-
CMake Options
-DSPLINTER_LIB=
- for static library, set to
Path/to/libsplinter-static-*-*.a
. - for shared library, set to
Path/to/libsplinter-*-*.so
on Linux andPath/to/libsplinter-*-*.dll
on Windows.
Remeber to copy the shared library to the executable path.
- for static library, set to
-DGLPK_LIB=
- for static library, set to
Path/to/libglpk.a
. - for shared library, set to
Path/to/libglpk.so
on Linux andPath/to/libglpk.dll.a
on Windows.
Remeber to copy the shared library to the executable path.
- for static library, set to
-
create a empty folder
exports
in the working directory to save outputs. -
DRPLAN [options] <GraphViz>.dot
.
DRPLAN -h
for help message of options.
> DRPLAN -h
Allowed options:
--input-file arg input file (.dot)
-f [ --flip ] arg vertex to be flipped (default: none)
-s [ --sample ] arg sample number (default: 20)
-l [ --use-length ] arg whether use edge length from the input (default:
true).
-h [ --help ] produce help message
- Use
neato -n -Tpng -O <GraphViz>.dot
to generate PNG file.
- Input
- Run
DRPLAN -f "3,5,7,8,10,11,12,14,15,16,17,19,22,25,31,33,35,37,38" -s 50 examples/hexlattice-21.dot
- Solution
DRPLAN is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE file for license rights and limitations (GPL).