Git Product home page Git Product logo

lbc's Introduction

LBC -- Local Barycentric Coordinates

----------------------------------------------------------------


Overview

This code implements the algorithm in the following paper:

Juyong Zhang, Bailin Deng, Zishun Liu, Giuseppe Patanè, Sofien Bouaziz, Kai Hormann, and Ligang Liu. 2014. Local barycentric coordinates. ACM Trans. Graph. 33, 6, 2014.

The GUI allows the user to load a 2D control cage, and compute the corresponding LBC. Currently there is no GUI support for loading 3D cages, although the solver code works for 3D cases too.

Currently the code works on Linux and Windows.


-----------------------------------------------------------------


Compiling

The code depends on the following external libraries:
- Eigen (http://eigen.tuxfamily.org), for linear algebra operations.
- Triangle (http://www.cs.cmu.edu/~quake/triangle.html), for Delaunay triangulation.
- Optionally, Cholmod (http://faculty.cse.tamu.edu/davis/suitesparse.html) for solving the linear system (supported on Linux only).

To install Eigen:
- On Linux, the easiest way is to install eigen from the software repository. For example, on Ubuntu and Debian, use the following command: apt-get install libeigen3-dev.
- On windows, download the source code of Eigen, extract it into the folder 'external' and rename the extracted folder as 'eigen'. In the end, you should be able to find the following file: external/eigen/Eigen/Dense . 

To install Triangle:
- Download the source code, extract it into the folder 'external', and name the extracted folder as 'triangle'. Afterwards, you should be able to find the file external/triangle/triangle.h .
- When compiled as a 64-bit application on Windows, the program might crash during triangulation because of an issue of the Triangle library. In order to fix this, you need to download the source codes from https://github.com/mesheldrake/Math-Geometry-Delaunay/tree/master/src_Win64 , and copy them to the folder external/triangle to replace the original codes of Triangle.

For Cholmod:
- Install suitesparse on Ubuntu/Debian with: apt-get install libsuitesparse-dev, and uncomment the line "DEFINES += USE_CHOLMOD" in the file LBC.pro .

With all the dependencies in place, you can generate the project files from LBC.pro, either by opening it in Qt Creator, or by using the qmake command directly. 


------------------------------------------------------------------


Usage

1) Press the button "Load 2D Cage" to load a cage obj file from folder 'data'. The vertices from the obj files are used as cage vertices.

2) Set the target number of cells for triangulation, and press the button "Triangulate" to compute the triangulation.

3) Set the solver parameters if necessary, then press the button "Compute LBC" to compute the coordinates.

4) Afterwards, check the checkbox "Display Weights", and click a control point to view its coordinate values via color coding.


------------------------------------------------------------------


Contact

The code is written by Bailin Deng ([email protected]) and Zishun Liu ([email protected]). Feel free to contact Bailin if you have comments or questions.


------------------------------------------------------------------


Acknowledgements

We would like to thank Ibraheem Alhashim and Benjamin Kluwe for their help on porting the codes to Windows.


-------------

License

LBC is released under GNU GPL V3.

lbc's People

Contributors

bldeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.