Files
igl/index.html
T

216 lines
10 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>libigl</title>
<meta name="author" content="Alec Jacobson and Daniele Panozzo and others"/>
<link type="text/css" rel="stylesheet" href="tutorial/style.css"/>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<link rel='stylesheet' href='http://yandex.st/highlightjs/7.3/styles/default.min.css'>
<script src='http://yandex.st/highlightjs/7.3/highlight.min.js'></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<h1 id="libigl-asimplecgeometryprocessinglibrary">libigl - A simple C++ geometry processing library</h1>
<figure>
<img src="libigl-teaser.png" alt="" />
<figcaption></figcaption></figure>
<p><a href="https://github.com/libigl/libigl/">https://github.com/libigl/libigl/</a></p>
<p>libigl is a simple C++ geometry processing library. We have a wide
functionality including construction of sparse discrete differential geometry
operators and finite-elements matrices such as the cotangent Laplacian and
diagonalized mass matrix, simple facet and edge-based topology data structures,
mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix
manipulation which make <a href="http://eigen.tuxfamily.org">Eigen</a> feel a lot more
like MATLAB.</p>
<p>It is <strong>a header-only library</strong>. You do not need to compile anything to use,
just include igl headers (e.g. <code>#include &lt;igl/cotmatrix.h&gt;</code>) and run. Each
header file contains a single function (e.g. <code>igl/cotmatrix.h</code> contains
<code>igl::cotmatrix()</code>). Most are tailored to operate on a generic triangle mesh
stored in an n-by&#8211;3 matrix of vertex positions V and an m-by&#8211;3 matrix of
triangle indices F. </p>
<p><em>Optionally</em> the library may also be <a href="optional/">pre-compiled</a> into a statically
linked library, for faster compile times with your projects. This only effects
compile time (run-time performance and behavior is identical). If in doubt, use
the header-only default mode: (i.e. just include the headers you want to use).</p>
<p>We use the <a href="http://eigen.tuxfamily.org">Eigen</a> library heavily in our code. Our
group prototypes a lot in MATLAB, and we have a useful <a href="matlab-to-eigen.html">MATLAB to libigl+Eigen
conversion table</a>.</p>
<h2 id="tutorial">Tutorial</h2>
<p>As of version 1.0, libigl includes an introductory
<a href="tutorial/tutorial.html">tutorial</a> that covers many functionalities.</p>
<h2 id="installation">Installation</h2>
<p>Libigl is a <strong>header-only</strong> library. You do <strong>not</strong> need to build anything to
install. Simply add <code>libigl/include</code> to your include path and include relevant
headers. Here is a small &#8220;Hello, World&#8221; program:</p>
<pre><code class="cpp">#include &lt;igl/cotmatrix.h&gt;
#include &lt;Eigen/Dense&gt;
#include &lt;Eigen/Sparse&gt;
#include &lt;iostream&gt;
int main()
{
Eigen::MatrixXd V(4,2);
V&lt;&lt;0,0,
1,0,
1,1,
0,1;
Eigen::MatrixXi F(2,3);
F&lt;&lt;0,1,2,
0,2,3;
Eigen::SparseMatrix&lt;double&gt; L;
igl::cotmatrix(V,F,L);
std::cout&lt;&lt;&quot;Hello, mesh: &quot;&lt;&lt;std::endl&lt;&lt;L*V&lt;&lt;std::endl;
return 0;
}
</code></pre>
<p>If you save this in <code>hello.cpp</code>, then you could compile this with (assuming
Eigen is installed in <code>/usr/local/include/eigen3</code>):</p>
<pre><code class="bash">gcc -I/usr/local/include/eigen3 -I./libigl/include/ hello.cpp -o hello
</code></pre>
<p>Running <code>./hello</code> would then produce</p>
<pre><code>Hello, mesh:
0.5 0.5
-0.5 0.5
-0.5 -0.5
0.5 -0.5
</code></pre>
<h2 id="dependencies">Dependencies</h2>
<p>Dependencies are on a per-include basis and the majority of the functions in
libigl depends only on the <a href="http://eigen.tuxfamily.org">Eigen</a> library.</p>
<p>For more information see our <a href="tutorial/tutorial.html">tutorial</a>.</p>
<h3 id="gccandtheoptionalcgaldependency">GCC and the optional CGAL dependency</h3>
<p>The <code>include/igl/cgal/*.h</code> headers depend on CGAL. It has come to our attention
that CGAL does not work properly with GCC 4.8. To the best of our knowledge,
GCC 4.7 and clang will work correctly.</p>
<h3 id="openmpandwindows">OpenMP and Windows</h3>
<p>Some of our functions will take advantage of OpenMP if available. However, it
has come to our attention that Visual Studio + Eigen + OpenMP does not work
properly. Since we use OpenMP only to improve performance, we recommend
avoiding OpenMP on Windows or proceeding with caution.</p>
<h2 id="download">Download</h2>
<p>You can keep up to date by cloning a read-only copy of our GitHub
<a href="https://github.com/libigl">repository</a>.</p>
<h2 id="knownissues">Known Issues</h2>
<p>We really heavily on Eigen. Nearly all inputs and outputs are Eigen matrices of
some kind. However, we currently <em>only</em> officially support Eigen&#8217;s default
column-major ordering. That means, we <strong>do not</strong> expect our code to work for
matrices using the <code>Eigen::RowMajor</code> flag. If you can, change definitions like:</p>
<pre><code class="cpp">Eigen::Matrix&lt;double, Eigen::Dynamic, 3, Eigen::RowMajor&gt; A;
</code></pre>
<p>to</p>
<pre><code class="cpp">Eigen::Matrix&lt;double, Eigen::Dynamic, 3, Eigen::ColMajor&gt; A;
// or simply
Eigen::Matrix&lt;double, Eigen::Dynamic, 3&gt; A;
</code></pre>
<p>We hope to fix this, or at least identify which functions are safe (many of
them probably work just fine). This requires setting up unit testing, which is
a major <em>todo</em> for our development.</p>
<h2 id="howtocontribute">How to contribute</h2>
<p>If you are interested in joining development, please fork the repository and
submit a <a href="https://help.github.com/articles/using-pull-requests/">pull request</a>
with your changes.</p>
<h2 id="license">License</h2>
<p>libigl is primarily <a href="http://www.mozilla.org/MPL/2.0/">MPL2</a> licensed
(<a href="http://www.mozilla.org/MPL/2.0/FAQ.html">FAQ</a>). Some files contain
third-party code under other licenses. We&#8217;re currently in the processes of
identifying these and marking appropriately.</p>
<h2 id="attribution">Attribution</h2>
<p>If you use libigl in your academic projects, please cite the papers we
implement as appropriate. To cite the library in general, you could use this
BibTeX entry:</p>
<pre><code class="bibtex">@misc{libigl,
title = {{libigl}: A simple {C++} geometry processing library},
author = {Alec Jacobson and Daniele Panozzo and others},
note = {http://libigl.github.io/libigl/},
year = {2015},
}
</code></pre>
<h2 id="projectsuniversitiesusinglibigl">Projects/Universities using libigl</h2>
<ul>
<li><a href="http://esotericsoftware.com/">Spine by Esoteric Software</a> is an animation tool dedicated to 2D characters.</li>
<li>Columbia University, <a href="http://www.cs.columbia.edu/cg/">Columbia Computer Graphics Group</a>, USA</li>
<li><a href="http://www.graphics.cornell.edu/">Cornell University</a>, USA</li>
<li>EPF Lausanne, <a href="http://lgg.epfl.ch/people.php">Computer Graphics and Geometry Laboratory</a>, Switzerland</li>
<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>
<li>George Mason University, <a href="http://cs.gmu.edu/~ygingold/">CraGL</a>, USA</li>
<li><a href="http://www.ust.hk/">Hong Kong University of Science and Technology</a>, USA</li>
<li><a href="http://www.nii.ac.jp/en/">National Institute of Informatics</a>, Japan</li>
<li>New York University, <a href="http://mrl.nyu.edu/">Media Research Lab</a>, USA</li>
<li>NYUPoly, <a href="http://game.engineering.nyu.edu/">Game Innovation Lab</a>, USA</li>
<li><a href="http://www.telecom-paristech.fr/en/formation-et-innovation-dans-le-numerique.html">Telecom ParisTech</a>, Paris, France</li>
<li><a href="http://www.tudelft.nl/en/">TU Delft</a>, Netherlands</li>
<li><a href="http://mtm.ufsc.br/~leo/">Universidade Federal de Santa Catarina</a>, Brazil</li>
<li><a href="http://www.usi.ch/en">Università della Svizzera Italiana</a>, Switzerland</li>
<li><a href="http://vecg.cs.ucl.ac.uk/">University College London</a>, England</li>
<li><a href="http://www.cam.ac.uk/">University of Cambridge</a>, England</li>
<li><a href="http://cg.cis.upenn.edu/">University of Pennsylvania</a>, USA</li>
</ul>
<h2 id="contact">Contact</h2>
<p>Libigl is a group endeavor led by <a href="http://www.cs.columbia.edu/~jacobson/">Alec
Jacobson</a> and <a href="http://www.inf.ethz.ch/personal/dpanozzo/">Daniele
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;
&#117;&#115;</a> if you have
questions or comments. We are happy to get feedback!</p>
<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;
&#110;&#111;&#116;&#101;</a>. Tell us who you
are and what you&#8217;re using it for. This helps us apply for funding and justify
spending time maintaining this.</p>
<p>If you find bugs or have problems please use our <a href="https://github.com/libigl/libigl/issues">github issue tracking
page</a>.</p>
<h2 id="copyright">Copyright</h2>
<p>2015 Alec Jacobson, Daniele Panozzo, Olga Diamanti, Christian Schüller, Kenshi
Takayama, Leo Sacht, Wenzel Jacob, Nico Pietroni, Amir Vaxman</p>
<figure>
<img src="tutorial/images/libigl-logo.jpg" alt="" />
<figcaption></figcaption></figure>
</body>
</html>