BendFields - Source Code readme

We provide C++ code to generate a non-orthogonal 2D cross field from a sparse set of constraints based on the BendFields energy. You can compile it if you have the libraries listed bellow, though Eigen++ is already provided in a subfolder. We also include a .pro file in case you want to directly open and compile the project using QtCreator IDE . If that's the case, you should update the paths to the libraries in the .pro file.

Our code is based on the following libraries:

The code has four main classes. The first two classes implement the data structures to store the cross field and the transition functions. The class HarmonicCrossField initializes the cross field (Section 6, NON-ORTHOGONAL 2D CROSS FIELDS - Greedy mixed-integer optimization). Its output cross field is taken as input by the BendField class (Section 6, NON-ORTHOGONAL 2D CROSS FIELDS - Nonlinear optimization).

We also provide a folder with sketches from the paper. The interface allows the user to load a sketch, annotate the curvature lines with the mouse, and compute the cross field using the BendField energy (for more details, follow our tutorial). Additionally, we provide functionallity to export the cross field in a file.