index.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>libigl</title>
  6. <meta name="author" content="Alec Jacobson and Daniele Panozzo and others"/>
  7. <link type="text/css" rel="stylesheet" href="tutorial/style.css"/>
  8. <script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
  9. <link rel='stylesheet' href='http://yandex.st/highlightjs/7.3/styles/default.min.css'>
  10. <script src='http://yandex.st/highlightjs/7.3/highlight.min.js'></script>
  11. <script>hljs.initHighlightingOnLoad();</script>
  12. </head>
  13. <body>
  14. <h1 id="libigl-asimplecgeometryprocessinglibrary">libigl - A simple C++ geometry processing library</h1>
  15. <figure>
  16. <img src="libigl-teaser.png" alt="" />
  17. <figcaption></figcaption></figure>
  18. <p><a href="https://github.com/libigl/libigl/">https://github.com/libigl/libigl/</a></p>
  19. <p>libigl is a simple C++ geometry processing library. We have a wide
  20. functionality including construction of sparse discrete differential geometry
  21. operators and finite-elements matrices such as the cotangent Laplacian and
  22. diagonalized mass matrix, simple facet and edge-based topology data structures,
  23. mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix
  24. manipulation which make <a href="http://eigen.tuxfamily.org">Eigen</a> feel a lot more
  25. like MATLAB.</p>
  26. <p>It is first and foremost a header library. Each header file contains a single
  27. function. Most are tailored to operate on a generic triangle mesh stored in an
  28. n-by&#8211;3 matrix of vertex positions V and an m-by&#8211;3 matrix of triangle indices F.
  29. The library may also be <a href="build/">compiled</a> into a statically linked
  30. library, for faster compile times with your projects.</p>
  31. <p>We use the <a href="http://eigen.tuxfamily.org">Eigen</a> library heavily in our code. Our
  32. group prototypes a lot in MATLAB, and we have a useful <a href="matlab-to-eigen.html">conversion
  33. table</a> from
  34. MATLAB to libigl/Eigen.</p>
  35. <h2 id="tutorial">Tutorial</h2>
  36. <p>As of version 1.0, libigl includes an introductory
  37. <a href="tutorial/tutorial.html">tutorial</a> that covers
  38. its basic functionalities.</p>
  39. <h2 id="installation">Installation</h2>
  40. <p>Libigl is a <em>header</em> library. You do <strong>not</strong> need to build anything to install.
  41. Simply add <code>igl/</code> to your include path and include relevant headers. Here is a
  42. small &#8220;Hello, World&#8221; program:</p>
  43. <pre><code class="cpp">#include &lt;igl/cotmatrix.h&gt;
  44. #include &lt;Eigen/Dense&gt;
  45. #include &lt;Eigen/Sparse&gt;
  46. #include &lt;iostream&gt;
  47. int main()
  48. {
  49. Eigen::MatrixXd V(4,2);
  50. V&lt;&lt;0,0,
  51. 1,0,
  52. 1,1,
  53. 0,1;
  54. Eigen::MatrixXi F(2,3);
  55. F&lt;&lt;0,1,2,
  56. 0,2,3;
  57. Eigen::SparseMatrix&lt;double&gt; L;
  58. igl::cotmatrix(V,F,L);
  59. std::cout&lt;&lt;&quot;Hello, mesh: &quot;&lt;&lt;std::endl&lt;&lt;L*V&lt;&lt;std::endl;
  60. return 0;
  61. }
  62. </code></pre>
  63. <p>If you save this in <code>hello.cpp</code>, then you could compile this with (assuming
  64. Eigen is installed in /opt/local/include/eigen3):</p>
  65. <pre><code class="bash">gcc -I/opt/local/include/eigen3 -I./igl/ hello.cpp -o hello
  66. </code></pre>
  67. <p>Running <code>./hello</code> would then produce</p>
  68. <pre><code>Hello, mesh:
  69. 0.5 0.5
  70. -0.5 0.5
  71. -0.5 -0.5
  72. 0.5 -0.5
  73. </code></pre>
  74. <h2 id="dependencies">Dependencies</h2>
  75. <p>Dependencies are on a per-include basis and the majority of the functions in
  76. libigl depends only on the <a href="http://eigen.tuxfamily.org">Eigen</a> library.</p>
  77. <p>For more information see our <a href="tutorial/tutorial.html">tutorial</a>.</p>
  78. <h3 id="gccandtheoptionalcgaldependency">GCC and the optional CGAL dependency</h3>
  79. <p>The <code>include/igl/cgal/*.h</code> headers depend on CGAL. It has come to our attention
  80. that CGAL does not work properly with GCC 4.8. To the best of our knowledge,
  81. GCC 4.7 and clang will work correctly.</p>
  82. <h3 id="openmpandwindows">OpenMP and Windows</h3>
  83. <p>Some of our functions will take advantage of OpenMP if available. However, it
  84. has come to our attention that Visual Studio + Eigen does not work properly
  85. with OpenMP. Since OpenMP only improves performance without affecting
  86. functionality we recommend avoiding OpenMP on Windows or proceeding with
  87. caution.</p>
  88. <h2 id="download">Download</h2>
  89. <p>You can keep up to date by cloning a read-only copy of our GitHub
  90. <a href="https://github.com/libigl">repository</a>.</p>
  91. <h2 id="knownissues">Known Issues</h2>
  92. <p>We really heavily on Eigen. Nearly all inputs and outputs are Eigen matrices of
  93. some kind. However, we currently <em>only</em> support Eigen&#8217;s default column-major
  94. ordering. That means, we <strong>do not</strong> expect our code to work for matrices using
  95. the <code>Eigen::RowMajor</code> flag. If you can, change definitions like:</p>
  96. <pre><code class="cpp">Eigen::Matrix&lt;double, Eigen::Dynamic, 3, Eigen::RowMajor&gt; A;
  97. </code></pre>
  98. <p>to</p>
  99. <pre><code class="cpp">Eigen::Matrix&lt;double, Eigen::Dynamic, 3, Eigen::ColMajor&gt; A;
  100. // or simply
  101. Eigen::Matrix&lt;double, Eigen::Dynamic, 3&gt; A;
  102. </code></pre>
  103. <p>We hope to fix this, or at least identify which functions are safe (many of
  104. them probably work just fine). This requires setting up unit testing, which is
  105. a major <em>todo</em> for our development.</p>
  106. <h2 id="howtocontribute">How to contribute</h2>
  107. <p>If you are interested in joining development, please fork the repository and
  108. submit a <a href="https://help.github.com/articles/using-pull-requests/">pull request</a>
  109. with your changes.</p>
  110. <h2 id="license">License</h2>
  111. <p>libigl is primarily <a href="http://www.mozilla.org/MPL/2.0/">MPL2</a> licensed
  112. (<a href="http://www.mozilla.org/MPL/2.0/FAQ.html">FAQ</a>). Some files contain
  113. third-party code under other licenses. We&#8217;re currently in the processes of
  114. identifying these and marking appropriately.</p>
  115. <h2 id="attribution">Attribution</h2>
  116. <p>If you use libigl in your academic projects, please cite the papers we
  117. implement as appropriate. To cite the library in general, you could use this
  118. BibTeX entry:</p>
  119. <pre><code class="bibtex">@misc{libigl,
  120. title = {{libigl}: A simple {C++} geometry processing library},
  121. author = {Alec Jacobson and Daniele Panozzo and others},
  122. note = {http://libigl.github.io/libigl/},
  123. year = {2015},
  124. }
  125. </code></pre>
  126. <h2 id="projectsuniversitiesusinglibigl">Projects/Universities using libigl</h2>
  127. <ul>
  128. <li><a href="http://esotericsoftware.com/">Spine by Esoteric Software</a> is an animation tool dedicated to 2D characters.</li>
  129. <li>Columbia University, <a href="http://www.cs.columbia.edu/cg/">Columbia Computer Graphics Group</a>, USA</li>
  130. <li><a href="http://www.graphics.cornell.edu/">Cornell University</a>, USA</li>
  131. <li>EPF Lausanne, <a href="http://lgg.epfl.ch/people.php">Computer Graphics and Geometry Laboratory</a>, Switzerland</li>
  132. <li>ETH Zurich, <a href="http://igl.ethz.ch/">Interactive Geometry Lab</a> and <a href="http://ait.inf.ethz.ch/">Advanced Technologies Lab</a>, Swizterland</li>
  133. <li>George Mason University, <a href="http://cs.gmu.edu/~ygingold/">CraGL</a>, USA</li>
  134. <li><a href="http://www.ust.hk/">Hong Kong University of Science and Technology</a>, USA</li>
  135. <li><a href="http://www.nii.ac.jp/en/">National Institute of Informatics</a>, Japan</li>
  136. <li>New York University, <a href="http://mrl.nyu.edu/">Media Research Lab</a>, USA</li>
  137. <li>NYUPoly, <a href="http://game.engineering.nyu.edu/">Game Innovation Lab</a>, USA</li>
  138. <li><a href="http://www.telecom-paristech.fr/en/formation-et-innovation-dans-le-numerique.html">Telecom ParisTech</a>, Paris, France</li>
  139. <li><a href="http://www.tudelft.nl/en/">TU Delft</a>, Netherlands</li>
  140. <li><a href="http://mtm.ufsc.br/~leo/">Universidade Federal de Santa Catarina</a>, Brazil</li>
  141. <li><a href="http://www.usi.ch/en">Università della Svizzera Italiana</a>, Switzerland</li>
  142. <li><a href="http://vecg.cs.ucl.ac.uk/">University College London</a>, England</li>
  143. <li><a href="http://www.cam.ac.uk/">University of Cambridge</a>, England</li>
  144. <li><a href="http://cg.cis.upenn.edu/">University of Pennsylvania</a>, USA</li>
  145. </ul>
  146. <h2 id="contact">Contact</h2>
  147. <p>Libigl is a group endeavor led by <a href="http://www.cs.columbia.edu/~jacobson/">Alec
  148. Jacobson</a> and <a href="http://www.inf.ethz.ch/personal/dpanozzo/">Daniele
  149. Panozzo</a>. Please <a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#x3a;&#x61;&#x6c;&#101;&#x63;&#x6a;&#x61;&#x63;&#111;&#98;&#115;&#111;&#110;&#64;&#103;&#109;&#x61;&#105;&#108;&#x2e;&#x63;&#x6f;&#x6d;&#44;&#x64;&#x61;&#110;&#105;&#101;&#x6c;&#101;&#x2e;&#x70;&#x61;&#110;&#x6f;&#122;&#x7a;&#x6f;&#64;&#x67;&#x6d;&#x61;&#x69;&#x6c;&#x2e;&#99;&#x6f;&#x6d;">&#99;&#x6f;&#x6e;&#116;&#x61;&#99;&#x74;
  150. &#117;&#115;</a> if you have
  151. questions or comments. We are happy to get feedback!</p>
  152. <p>If you&#8217;re using libigl in your projects, quickly <a href="&#x6d;&#x61;&#105;&#108;&#x74;&#x6f;&#58;&#97;&#x6c;&#101;&#99;&#106;&#x61;&#x63;&#111;&#x62;&#x73;&#x6f;&#110;&#64;&#103;&#x6d;&#x61;&#x69;&#x6c;&#46;&#99;&#x6f;&#x6d;&#x2c;&#100;&#x61;&#110;&#105;&#x65;&#108;&#x65;&#x2e;&#112;&#97;&#x6e;&#111;&#x7a;&#x7a;&#x6f;&#x40;&#103;&#109;&#x61;&#105;&#x6c;&#x2e;&#x63;&#111;&#109;">&#x64;&#x72;&#111;&#112; &#x75;&#x73; &#97;
  153. &#110;&#111;&#116;&#101;</a>. Tell us who you
  154. are and what you&#8217;re using it for. This helps us apply for funding and justify
  155. spending time maintaining this.</p>
  156. <p>If you find bugs or have problems please use our <a href="https://github.com/libigl/libigl/issues">github issue tracking
  157. page</a>.</p>
  158. <h2 id="copyright">Copyright</h2>
  159. <p>2015 Alec Jacobson, Daniele Panozzo, Olga Diamanti, Christian Schüller, Kenshi
  160. Takayama, Leo Sacht, Wenzel Jacob, Nico Pietroni, Amir Vaxman</p>
  161. <figure>
  162. <img src="tutorial/images/libigl-logo.jpg" alt="" />
  163. <figcaption></figcaption></figure>
  164. </body>
  165. </html>