This code is an implementation for paper "Discrete Connection and Covariant Derivative for Vector Field Analysis and Design".
This code is written and only tested on Mac OS Catalina Version 10.15.2. But it should be very easy to adapt to different OS.
Only the globally optimal connection is included. The subsequent procudure to compute globally optimal (smoothest) field is NOT included.
There are 2 dependacies for this code - Eigen and CGAL. Eigen is included in the repository, so only CGAL is required to install before compilation.
-
Installation of CGAL On Mac OS, Homebrew is used to install various packages. see "https://brew.sh/" for more details on how to install Homebrew. Once Homebre is installed, execute command "brew install CGAL" to install CGAL.
-
Compilation Create and enter a folder "build" in the root repository. Execute command "cmake .." to generate the makefile. Execute command "make" to compile the code. Once it is successfully compiled, an executible file "Connection" is generated.
-
Usage The input only requires an ".off" file to describe the triangle mesh. The output the is file "mesh_vf.vtk", which discribes the vector field generated by propagating a single vector at a certain vertex to the whole mesh based on the globally optimal connection. Software "Paraview" is used to display ".vtk" files.
A file "sphere.off" is in folder "mesh" for testing. Execute command "./Connection sphere.off" to launch a first test. Check "mesh_vf.vtk" for a visulization of the connection.