Browse Source

clean up in the readme/tutorial/build

Former-commit-id: 31f57624ef2186decfcdf64fbf9b3024c991f22b
Daniele Panozzo 10 years ago
parent
commit
64d3018863
4 changed files with 497 additions and 767 deletions
  1. 43 351
      README.md
  2. 69 0
      RELEASE_HISTORY.txt
  3. 385 0
      build/README.md
  4. 0 416
      tutorial.html

+ 43 - 351
README.md

@@ -1,28 +1,24 @@
-libigl - A simple c++ geometry processing library
-=================================================
+# libigl - A simple C++ geometry processing library
 
 ![](tutorial/images/libigl-logo.jpg)
 
-<http://igl.ethz.ch/projects/libigl/>
-<https://github.com/alecjacobson/libigl/>
+<https://github.com/libigl/libigl/>
 
-Copyright 2014 - Alec Jacobson, Daniele Panozzo, Olga Diamanti, Kenshi
-Takayama, Leo Sacht, Wenzel Jacob, etc.
+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 contangent 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 [Eigen](http://eigen.tuxfamily.org) feel a lot more like MATLAB.
 
-Libigl is first and foremost a *header* library. Each header file should
-contain a single function.  This function may have multiple overloads and
-prototypes. All functions should use the `igl::` namespace and should adhere to
-the conventions and styles listed in the [style
-guidelines](style_guidelines.html).
+It is first and foremost a header library. Each header file contains a single function. Most are tailored to operate on a generic triangle mesh stored in an n-by-3 matrix of vertex positions V and an m-by-3 matrix of triangle indices F. The library may also be [compiled](build/README.html) into a statically linked library, for faster compile times with your projects.
 
-> **New:** As of 1 July 2014, we have released libigl as beta version 1.0.
-> There are a number of changes we collected for this release to minimize
-> confusion and changes to how you use libigl. See [Version 1.0
-> Changes][version1.0changes].
+We use the [Eigen](http://eigen.tuxfamily.org) library heavily in our code. Our group prototypes a lot in MATLAB, and we have a useful [conversion table](http://libigl.github.io/libigl/tutorial/matlab-to-eigen.html) from MATLAB to libigl/Eigen.
 
-## Installation ##
+# Tutorial
+
+As of version 1.0, libigl includes an introductory
+[tutorial](http://libigl.github.io/libigl/tutorial/tutorial.html) that covers
+its basic functionalities.
+
+## Installation
 Libigl is a *header* library. You do **not** need to build anything to install.
-Simple add `igl/` to your include path and include relevant headers. Here's a
+Simply add `igl/` to your include path and include relevant headers. Here is a
 small "Hello, World" program:
 
 ```cpp
@@ -47,8 +43,8 @@ int main()
 }
 ```
 
-If you save this in `hello.cpp`, then on `gcc` with Eigen installed via
-macports for example you could compile this with:
+If you save this in `hello.cpp`, then you could compile this with (assuming Eigen
+  is installed in /opt/local/include/eigen3):
 
 ```bash
 gcc -I/opt/local/include/eigen3 -I./igl/ hello.cpp -o hello
@@ -64,352 +60,48 @@ Hello, mesh:
  0.5 -0.5
 ```
 
-## Tutorial ##
-
-As of version 1.0, libigl includes an introductory
-[tutorial](http://libigl.github.io/libigl/tutorial/tutorial.html) that covers
-its basic functionalities.
-
-## Dependencies ##
-- Eigen3  Last tested with Eigen Version 3.2
-
-### Optional ###
-- OpenGL (disable with `IGL_NO_OPENGL`)
-    * OpenGL >= 4 (enable with `IGL_OPENGL_4`)
-- AntTweakBar  (disable with `IGL_NO_ANTTWEAKBAR`) Last tested 1.16 (see
-  `libigl/external/AntTweakBar`)
-- GLEW  Windows and Linux
-- OpenMP
-- libpng  libiglpng extra only
-- Mosek  libiglmosek extra only
-- Matlab  libiglmatlab extra only
-- boost  libiglboost, libiglcgal extra only
-- SSE/AVX  libiglsvd3x3 extra only
-- CGAL  libiglcgal extra only
-    * boost
-    * gmp
-    * mpfr
-- CoMiSo libcomiso extra only
-
-### Optional (included in external/) ###
-- TetGen  libigltetgen extra only
-- Embree  libiglembree extra only
-- tinyxml2  libiglxml extra only
-- glfw libviewer extra only
-- LIM  liblim extra only
-
-## Header only ##
-Libigl is designed to work "out-of-the-box" as a headers only library. To
-include libigl in your project. You need only include the libigl/include/
-directory in your include path. To
-compile a hello-word example.cpp:
-
-    #include <Eigen/Dense>
-    #include <igl/readOBJ.h>
-    #include <iostream>
-    int main(int argc, char * argv[])
-    {
-      if(argc>1)
-      {
-        Eigen::MatrixXd V;
-        Eigen::MatrixXi F;
-        igl::readOBJ(argv[1],V,F);
-        std::cout<<"Hello, mesh with "<<V.rows()<<" vertices!"<<std::endl;
-      }else{
-        std::cout<<"Hello, world!"<<std::endl;
-      }
-      return 0;
-    }
-
-using gcc (replacing appropriate paths):
-
-    g++ -I/usr/local/igl/libigl/include \
-      -I/opt/local/include/eigen3 example.cpp -o example
-
-Then run this example with:
-
-    ./example examples/shared/TinyTorus.obj
-
-## Compilation as a static library ##
-Libigl is developed most often on Mac OS X, though has current users in Linux
-and Windows.
-
-### Linux/Mac OS X/Cygwin ###
-
-Libigl may also be compiled to a static library. This is advantageous when
-building a project with libigl, since when used as an header-only library can
-slow down compile times.
-
-To build the entire libigl library producing lib/libigl.a, issue:
-
-    cd build
-    make lib
-
-You may need to edit Makefile.conf accordingly. Best to give yourself an
-`IGL_USERNAME` and add a custom install suite for yourself. Then you can enable
-appropriate extras.
-
-#### Extras ####
-Once you've set up an `IGL_USERNAME` and enabled extras within Makefile.conf.
-You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
-lib/libigltetgen.a, lib/libiglmosek.a, etc.) by issuing:
-
-    cd build
-    make extras
-
-#### Examples ####
-You can make a slew of examples by issuing:
-
-    cd build
-    make examples
-
-#### External ####
-Finally there are a number of external libraries that we include in
-./external/ because they are either difficult to obtain or they have been
-patched for easier use with libigl. Please see the respective readmes in
-those directories.
-
-
-##### Installing AntTweakBar #####
-To build the a static AntTweakBar library on Mac OS X issue:
-
-    cd external/AntTweakBar/src
-    make -f Makefile.osx.igl
-
-##### Installing Tetgen #####
-To build the tetgen library and executable on Mac OS X issue:
-
-    cd external/tetgen
-    make clean
-    rm -f obj/*.o
-    make -f Makefile.igl tetgen
-    rm -f obj/*.o
-    make -f Makefile.igl tetlib
-
-##### Installing medit #####
-To build the igl version of the medit executable on Mac OS X issue:
-
-    cd external/medit
-    make -C libmesh
-    make -f Makefile.igl medit
-
-##### Installing Embree 2.0 #####
-To build the embree library and executables on Mac OS X issue:
-
-    cd external/embree
-    mkdir build
-    cd build
-    cmake ..
-    # Or using a different compiler
-    #cmake .. -DCMAKE_C_COMPILER=/opt/local/bin/gcc -DCMAKE_CXX_COMPILER=/opt/local/bin/g++
-    make
-    # Could also install embree to your root, but libigl examples don't expect
-    # this
-    #sudo make install
-
-##### Installing tinyxml2 #####
-To build the a static tinyxml2 library on Mac OS X issue:
-
-    cd external/tinyxml2
-    cmake .
-    make
-
+## Dependencies
+Dependencies are on a per-include basis and the majority of the functions in libigl
+depends only on the [Eigen](http://eigen.tuxfamily.org) library.
 
-##### Installing YImg #####
-To build the a static YImg library on Mac OS X issue:
+For more information see our [tutorial](tutorial/tutorial.html).
 
-    cd external/yimg
-    make
+# Download
+You can keep up to date by cloning a read-only copy of our GitHub [repository](https://github.com/libigl).
 
-You may need to install libpng. Systems with X11 might find this already
-installed at `/usr/X11/lib`.
+## How to contribute
 
+If you are interested in joining development, please fork the repository and submit a [pull request](https://help.github.com/articles/using-pull-requests/) with your changes.
 
-### Windows (Experimental) ###
-To build a static library (.lib) on windows, open Visual Studio 2010.
+## License
+libigl is primarily [MPL2](http://www.mozilla.org/MPL/2.0/) licensed ([FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html)). Some files contain third-party code under other licenses. We're currently in the processes of identifying these and marking appropriately.
 
-- New > Project ...
-- Visual C++ > Win32
-- Win32 Console Application
-- Name: libiglVisualStudio
-- Uncheck "Create directory for solution"
-- Then hit OK, and then Next
-- Check "Static Library"
-- Uncheck "Precompiled headers"
-- Add all include/igl/*.cpp to the sources directory
-- Add all include/igl/*.h to the headers directory
-- Open Project > libigl Properties...
-- Add the path to eigen3 to the include paths
-- Change the target name to libigl
-- Build and pray (this should create libigl.lib
+## Attribution
+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:
 
-[Source](http://msdn.microsoft.com/en-us/library/ms235627(v=vs.80).aspx)
-
-## Examples ##
-To get started, we advise that you take a look at a few examples:
-
-    ./examples/hello-world/
-
-    ./examples/meshio/
-
-    ./examples/basic-topology/
-
-    ./examples/ReAntTweakBar/
-
-## Extras ##
-Libigl compartmentalizes dependences via its organization into a _main_ libigl
-library and "extras."
-
-
-### bbw ###
-This library extra contains functions for computing Bounded Biharmonic Weights, can
-be used with and without the [mosek](#mosek) extra via the `IGL_NO_MOSEK`
-macro.
-
-### boost ###
-This library extra utilizes the graph functions in the boost library for find
-connected components and performing breadth-first traversals.
-
-### cgal ###
-This library extra utilizes CGAL's efficient and exact intersection and
-proximity queries.
-
-### embree ###
-This library extra utilizes embree's efficient ray tracing queries.
-
-### matlab ###
-This library extra provides support for reading and writing `.mat` workspace
-files, interfacing with Matlab at run time and compiling mex functions.
-
-### mosek ###
-This library extra utilizes mosek's efficient interior-point solver for
-quadratic programs.
-
-### png ###
-This library extra uses `libpng` and `YImage` to read and write `.png` files.
-
-### svd3x3 ###
-This library extra implements "as-rigid-as-possible" (ARAP) deformation
-techniques using the fast singular value decomposition routines
-written specifically for 3x3 matrices to use `SSE` intrinsics. This extra can
-still be compiled without sse support and support should be determined
-automatically at compile time via the `__SSE__` macro.
-
-### tetgen ###
-This library extra provides a simplified wrapper to the tetgen 3d tetrahedral meshing
-library.
-
-### viewer ###
-This library extra utilizes glfw and glew to open an opengl context and launch
-a simple mesh viewer.
-
-### xml ###
-This library extra utilizes tinyxml2 to read and write serialized classes
-containing Eigen matrices and other standard simple data-structures.
-
-## Development ##
-Further documentation for developers is listed in tutorial.html,
-style_guidelines.html
-
-## License ##
-See `LICENSE.txt`
-
-## Zipping ##
-Zip this directory without .git litter and binaries using:
-
-    git archive -prefix=libigl/ -o libigl.zip master
-
-## Version 1.0 Changes ##
-Our beta release marks our confidence that this library can be used outside of
-casual experimenting. To maintain order, we have made a few changes which
-current users should read and adapt their code accordingly.
-
-### Renamed functions ###
-The following table lists functions which have changed name as of version
-1.0.0:
-
-Old                              | New
--------------------------------- | -------------------------------------
-`igl::add_barycenter`            | `igl::false_barycentric_subdivision`
-`igl::areamatrix`                | `igl::vector_area_matrix`
-`igl::barycentric2global`        | `igl::barycentric_to_global`
-`igl::boundary_faces`            | `igl::boundary_facets`
-`igl::boundary_vertices_sorted`  | `igl::boundary_loop`
-`igl::cotangent`                 | `igl::cotmatrix_entries`
-`igl::edgetopology`              | `igl::edge_topology`
-`igl::gradMat`                   | `igl::grad`
-`igl::is_manifold`               | `igl::is_edge_manifold`
-`igl::mexStream`                 | `igl::MexStream`
-`igl::moveFV`                    | `igl::average_onto_vertices`
-`igl::moveVF`                    | `igl::average_onto_faces`
-`igl::plot_vector`               | `igl::print_vector`
-`igl::pos`                       | `igl::HalfEdgeIterator`
-`igl::plane_project`             | `igl::project_isometrically_to_plane`
-`igl::project_points_mesh`       | `igl::line_mesh_intersection`
-`igl::read`                      | `igl::read_triangle_mesh`
-`igl::removeDuplicates.cpp`      | `igl::remove_duplicates`
-`igl::removeUnreferenced`        | `igl::remove_unreferenced`
-`igl::tt`                        | `igl::triangle_triangle_adjacency`
-`igl::vf`                        | `igl::vertex_triangle_adjacency`
-`igl::write`                     | `igl::write_triangle_mesh`
-`igl::manifold_patches`          | `igl::orientable_patches`
-`igl::selfintersect`             | `igl::remesh_self_intersections`
-`igl::project_mesh`              | `igl::line_mesh_intersection`
-`igl::triangulate`               | `igl::polygon_mesh_to_triangle_mesh`
-`igl::is_manifold`               | `igl::is_edge_manifold`
-`igl::triangle_wrapper`          | `igl::triangulate`
+```bibtex
+@misc{libigl,
+  title = {{libigl}: A simple {C++} geometry processing library},
+  author = {Alec Jacobson and Daniele Panozzo and others},
+  note = {http://igl.ethz.ch/projects/libigl/},
+  year = {2014},
+}
+```
 
-### Miscellaneous ###
- - To match interfaces provided by (all) other quadratic optimization
-   libraries, `igl::min_quad_with_fixed` and `igl::active_set` now expect as
-   input twice the quadratic coefficients matrix, i.e. the Hessian. For
-   example, `igl::min_quad_with_fixed(H,B,...)` minimizes $\frac{1}{2}x^T H
-   x+x^T B$.
- - We have inverted the `IGL_HEADER_ONLY` macro to `IGL_STATIC_LIBRARY`. To
-   compile using libigl as a header-only library, simply include headers and
-   libigl in the header search path. To link to libigl, you must define the
-   `IGL_STATIC_LIBRARY` macro at compile time and link to the `libigl*.a`
-   libraries.
- - Building libigl as a static library is now more organized. There is a
-   `build/` directory with Makefiles for the main library (`Makefile`) and each
-   dependency (e.g. `Makefile_mosek` for `libiglmosek.a`)
- - `igl::polar_svd` now always returns a rotation in `R`, never a reflection.
-   This mirrors the behavior of `igl::polar_svd3x3`.  Consequently the `T`
-   part may have negative skews.
- - We have organized the static
- - The previous `igl::grad` function, which computed the per-triangle gradient
-   of a per-vertex scalar function has been replaced. Now `igl::grad` computes
-   the linear operator (previous computed using `igl::gradMat`). The gradient
-   values can still be recovered by multiplying the operator against the scalar
-   field as a vector and reshaping to have gradients per row.
- - `MASSMATRIX_*` has become `MASSMATRIX_TYPE_*`
- - The function `igl::project_normals`, which cast a line for each vertex of
-   mesh _A_ in the normal direction and found the closest intersection along
-   these lines with mesh _B_, has been removed.
+# Contact
 
-## Contact ##
-Libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
-contact [alecjacobson@gmail.com](mailto:alecjacobson@gmail.com) if you have
-questions or comments. We are happy to get feedback! Enjoy!
+Libigl is a group endeavor led by [Alec Jacobson](http://www.cs.columbia.edu/~jacobson/) and [Daniele Panozzo](http://www.inf.ethz.ch/personal/dpanozzo/). Please
+[contact us](mailto:alecjacobson@gmail.com,daniele.panozzo@gmail.com) if you have questions or comments. We are happy to get feedback!
 
 If you're using libigl in your projects, quickly [drop us a
-note](mailto:alecjacobson@gmail.com). Tell us who you are and what you're using
-it for. This helps us apply for funding and justify spending time maintaining
+note](mailto:alecjacobson@gmail.com,daniele.panozzo@gmail.com). Tell us who you are and what you're using it for. This helps us apply for funding and justify spending time maintaining
 this.
 
 If you find bugs or have problems please use our [github issue tracking
 page](https://github.com/libigl/libigl/issues).
 
-## Academic citation ##
-If you use libigl in your research projects, please cite the papers we
-implement as appropriate. To cite the library in general, you could use this
-BibTeX entry:
 
-```bibtex
-@misc{libigl,
-  title = {{libigl}: A simple {C++} geometry processing library},
-  author = {Alec Jacobson and Daniele Panozzo and others},
-  note = {http://igl.ethz.ch/projects/libigl/},
-  year = {2014},
-}
-```
+### Copyright
+2014 Alec Jacobson, Daniele Panozzo, Olga Diamanti, Kenshi
+Takayama, Leo Sacht, Wenzel Jacob, Nico Pietroni, Amir Vaxman

+ 69 - 0
RELEASE_HISTORY.txt

@@ -3,6 +3,75 @@
 1.0.2  Bug fix in winding number code
 1.0.1  Bug fixes and more CGAL support
 1.0.0  Major beta release: many renames, tutorial, triangle wrapper, org. build
+
+## Version 1.0 Changes ##
+Our beta release marks our confidence that this library can be used outside of
+casual experimenting. To maintain order, we have made a few changes which
+current users should read and adapt their code accordingly.
+
+### Renamed functions ###
+The following table lists functions which have changed name as of version
+1.0.0:
+
+Old                              | New
+-------------------------------- | -------------------------------------
+`igl::add_barycenter`            | `igl::false_barycentric_subdivision`
+`igl::areamatrix`                | `igl::vector_area_matrix`
+`igl::barycentric2global`        | `igl::barycentric_to_global`
+`igl::boundary_faces`            | `igl::boundary_facets`
+`igl::boundary_vertices_sorted`  | `igl::boundary_loop`
+`igl::cotangent`                 | `igl::cotmatrix_entries`
+`igl::edgetopology`              | `igl::edge_topology`
+`igl::gradMat`                   | `igl::grad`
+`igl::is_manifold`               | `igl::is_edge_manifold`
+`igl::mexStream`                 | `igl::MexStream`
+`igl::moveFV`                    | `igl::average_onto_vertices`
+`igl::moveVF`                    | `igl::average_onto_faces`
+`igl::plot_vector`               | `igl::print_vector`
+`igl::pos`                       | `igl::HalfEdgeIterator`
+`igl::plane_project`             | `igl::project_isometrically_to_plane`
+`igl::project_points_mesh`       | `igl::line_mesh_intersection`
+`igl::read`                      | `igl::read_triangle_mesh`
+`igl::removeDuplicates.cpp`      | `igl::remove_duplicates`
+`igl::removeUnreferenced`        | `igl::remove_unreferenced`
+`igl::tt`                        | `igl::triangle_triangle_adjacency`
+`igl::vf`                        | `igl::vertex_triangle_adjacency`
+`igl::write`                     | `igl::write_triangle_mesh`
+`igl::manifold_patches`          | `igl::orientable_patches`
+`igl::selfintersect`             | `igl::remesh_self_intersections`
+`igl::project_mesh`              | `igl::line_mesh_intersection`
+`igl::triangulate`               | `igl::polygon_mesh_to_triangle_mesh`
+`igl::is_manifold`               | `igl::is_edge_manifold`
+`igl::triangle_wrapper`          | `igl::triangulate`
+
+### Miscellaneous ###
+ - To match interfaces provided by (all) other quadratic optimization
+   libraries, `igl::min_quad_with_fixed` and `igl::active_set` now expect as
+   input twice the quadratic coefficients matrix, i.e. the Hessian. For
+   example, `igl::min_quad_with_fixed(H,B,...)` minimizes $\frac{1}{2}x^T H
+   x+x^T B$.
+ - We have inverted the `IGL_HEADER_ONLY` macro to `IGL_STATIC_LIBRARY`. To
+   compile using libigl as a header-only library, simply include headers and
+   libigl in the header search path. To link to libigl, you must define the
+   `IGL_STATIC_LIBRARY` macro at compile time and link to the `libigl*.a`
+   libraries.
+ - Building libigl as a static library is now more organized. There is a
+   `build/` directory with Makefiles for the main library (`Makefile`) and each
+   dependency (e.g. `Makefile_mosek` for `libiglmosek.a`)
+ - `igl::polar_svd` now always returns a rotation in `R`, never a reflection.
+   This mirrors the behavior of `igl::polar_svd3x3`.  Consequently the `T`
+   part may have negative skews.
+ - We have organized the static
+ - The previous `igl::grad` function, which computed the per-triangle gradient
+   of a per-vertex scalar function has been replaced. Now `igl::grad` computes
+   the linear operator (previous computed using `igl::gradMat`). The gradient
+   values can still be recovered by multiplying the operator against the scalar
+   field as a vector and reshaping to have gradients per row.
+ - `MASSMATRIX_*` has become `MASSMATRIX_TYPE_*`
+ - The function `igl::project_normals`, which cast a line for each vertex of
+   mesh _A_ in the normal direction and found the closest intersection along
+   these lines with mesh _B_, has been removed.
+
 0.4.6  Generalized Winding Numbers
 0.4.5  CGAL extra: mesh selfintersection
 0.4.4  STL file format support

+ 385 - 0
build/README.md

@@ -0,0 +1,385 @@
+# Compilation as a static library
+
+`Warning: compiling igl as a static library is considerably more difficult than using it as
+a header-only library. Do it only if you are experienced with C++ and you want to
+improve your compilation times.`
+
+Libigl is developed most often on Mac OS X, though has current users in Linux
+and Windows.
+
+### Linux/Mac OS X/Cygwin ###
+
+Libigl may also be compiled to a static library. This is advantageous when
+building a project with libigl, since when used as an header-only library can
+slow down compile times.
+
+To build the entire libigl library producing lib/libigl.a, issue:
+
+    cd build
+    make lib
+
+You may need to edit Makefile.conf accordingly. Best to give yourself an
+`IGL_USERNAME` and add a custom install suite for yourself. Then you can enable
+appropriate extras.
+
+#### Extras ####
+Once you've set up an `IGL_USERNAME` and enabled extras within Makefile.conf.
+You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
+lib/libigltetgen.a, lib/libiglmosek.a, etc.) by issuing:
+
+    cd build
+    make extras
+
+#### Examples ####
+You can make a slew of examples by issuing:
+
+    cd build
+    make examples
+
+#### External ####
+Finally there are a number of external libraries that we include in
+./external/ because they are either difficult to obtain or they have been
+patched for easier use with libigl. Please see the respective readmes in
+those directories.
+
+
+##### Installing AntTweakBar #####
+To build the a static AntTweakBar library on Mac OS X issue:
+
+    cd external/AntTweakBar/src
+    make -f Makefile.osx.igl
+
+##### Installing Tetgen #####
+To build the tetgen library and executable on Mac OS X issue:
+
+    cd external/tetgen
+    make clean
+    rm -f obj/*.o
+    make -f Makefile.igl tetgen
+    rm -f obj/*.o
+    make -f Makefile.igl tetlib
+
+##### Installing medit #####
+To build the igl version of the medit executable on Mac OS X issue:
+
+    cd external/medit
+    make -C libmesh
+    make -f Makefile.igl medit
+
+##### Installing Embree 2.0 #####
+To build the embree library and executables on Mac OS X issue:
+
+    cd external/embree
+    mkdir build
+    cd build
+    cmake ..
+    # Or using a different compiler
+    #cmake .. -DCMAKE_C_COMPILER=/opt/local/bin/gcc -DCMAKE_CXX_COMPILER=/opt/local/bin/g++
+    make
+    # Could also install embree to your root, but libigl examples don't expect
+    # this
+    #sudo make install
+
+##### Installing tinyxml2 #####
+To build the a static tinyxml2 library on Mac OS X issue:
+
+    cd external/tinyxml2
+    cmake .
+    make
+
+
+##### Installing YImg #####
+To build the a static YImg library on Mac OS X issue:
+
+    cd external/yimg
+    make
+
+You may need to install libpng. Systems with X11 might find this already
+installed at `/usr/X11/lib`.
+
+
+### Windows (Experimental) ###
+To build a static library (.lib) on windows, open Visual Studio 2010.
+
+- New > Project ...
+- Visual C++ > Win32
+- Win32 Console Application
+- Name: libiglVisualStudio
+- Uncheck "Create directory for solution"
+- Then hit OK, and then Next
+- Check "Static Library"
+- Uncheck "Precompiled headers"
+- Add all include/igl/*.cpp to the sources directory
+- Add all include/igl/*.h to the headers directory
+- Open Project > libigl Properties...
+- Add the path to eigen3 to the include paths
+- Change the target name to libigl
+- Build and pray (this should create libigl.lib
+
+[Source](http://msdn.microsoft.com/en-us/library/ms235627(v=vs.80).aspx)
+
+## Examples ##
+To get started, we advise that you take a look at a few examples:
+
+    ./examples/hello-world/
+
+    ./examples/meshio/
+
+    ./examples/basic-topology/
+
+    ./examples/ReAntTweakBar/
+
+## Extras ##
+Libigl compartmentalizes dependences via its organization into a _main_ libigl
+library and "extras."
+
+
+### bbw ###
+This library extra contains functions for computing Bounded Biharmonic Weights, can
+be used with and without the [mosek](#mosek) extra via the `IGL_NO_MOSEK`
+macro.
+
+### boost ###
+This library extra utilizes the graph functions in the boost library for find
+connected components and performing breadth-first traversals.
+
+### cgal ###
+This library extra utilizes CGAL's efficient and exact intersection and
+proximity queries.
+
+### embree ###
+This library extra utilizes embree's efficient ray tracing queries.
+
+### matlab ###
+This library extra provides support for reading and writing `.mat` workspace
+files, interfacing with Matlab at run time and compiling mex functions.
+
+### mosek ###
+This library extra utilizes mosek's efficient interior-point solver for
+quadratic programs.
+
+### png ###
+This library extra uses `libpng` and `YImage` to read and write `.png` files.
+
+### svd3x3 ###
+This library extra implements "as-rigid-as-possible" (ARAP) deformation
+techniques using the fast singular value decomposition routines
+written specifically for 3x3 matrices to use `SSE` intrinsics. This extra can
+still be compiled without sse support and support should be determined
+automatically at compile time via the `__SSE__` macro.
+
+### tetgen ###
+This library extra provides a simplified wrapper to the tetgen 3d tetrahedral meshing
+library.
+
+### viewer ###
+This library extra utilizes glfw and glew to open an opengl context and launch
+a simple mesh viewer.
+
+### xml ###
+This library extra utilizes tinyxml2 to read and write serialized classes
+containing Eigen matrices and other standard simple data-structures.
+
+## Development ##
+Further documentation for developers is listed in tutorial.html,
+style_guidelines.html
+
+## License ##
+See `LICENSE.txt`
+
+## Zipping ##
+Zip this directory without .git litter and binaries using:
+
+    git archive -prefix=libigl/ -o libigl.zip master
+
+## Explicit specialization of templated functions
+
+Special care must be taken by the developers of each function and
+class in the libigl library that uses C++ templates. If this function
+is intended to be compiled into the statically linked libigl library
+then function is only compiled for each <i>explicitly</i> specialized
+declaration. These should be added at the bottom of the corresponding
+.cpp file surrounded by a
+
+    #ifdef IGL_STATIC_LIBRARY
+
+Of course, a developer may not know ahead of time which
+specializations should be explicitly included in the igl static lib.
+One way to find out is to add one explicit specialization for each
+call in one's own project. This only ever needs to be done once for
+each template.
+
+The process is somewhat mechanical using a linker with reasonable error
+output.
+
+Supposed for example we have compiled the igl static lib, including the
+cat.h and cat.cpp functions, without any explicit instanciation. Say
+using the makefile in the `libigl` directory:
+
+    cd $LIBIGL
+    make
+
+Now if we try to compile a project and link against it we may get
+an error like:
+
+
+    Undefined symbols for architecture x86_64:
+    "Eigen::Matrix<int, -1, -1, 0, -1, -1> igl::cat<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(int, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&)", referenced from:
+    uniform_sample(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, int, double, Eigen::Matrix<double, -1, -1, 0, -1, -1>&)in Skinning.o
+    "Eigen::SparseMatrix<double, 0, int> igl::cat<Eigen::SparseMatrix<double, 0, int> >(int, Eigen::SparseMatrix<double, 0, int> const&, Eigen::SparseMatrix<double, 0, int> const&)", referenced from:
+    covariance_scatter_matrix(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, ArapEnergy, Eigen::SparseMatrix<double, 0, int>&)in arap_dof.o
+    arap_rhs(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, ArapEnergy, Eigen::SparseMatrix<double, 0, int>&)in arap_dof.o
+
+This looks like a mess, but luckily we don't really need to read it
+all. Just copy the first part in quotes
+
+    Eigen::Matrix<int, -1, -1, 0, -1, -1> igl::cat<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(int, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&)
+
+, then append it
+to the list of explicit template specializations at the end of
+`cat.cpp` after the word
+**template** and followed by a semi-colon.
+Like this:
+
+    #ifdef IGL_STATIC_LIBRARY
+    // Explicit template specialization
+    template Eigen::Matrix<int, -1, -1, 0, -1, -1> igl::cat<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(int, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&);
+    #endif
+
+Then you must recompile the IGL static library.
+
+    cd $LIBIGL
+    make
+
+And try to compile your project again, potentially repeating this
+process until no more symbols are undefined.
+
+`It may be useful to check that you code compiles with
+no errors first using the headers-only version to be sure that all errors are from missing template
+specializations.`
+
+If you're using make then the following command will
+reveal each missing symbol on its own line:
+
+    make 2>&1 | grep "referenced from" | sed -e "s/, referenced from.*//"
+
+Alternatively you can use the `autoexplicit.sh` function
+which (for well organized .h/.cpp pairs in libigl) automatically
+create explicit instanciations from your compiler's error messages.
+Repeat this process until convergence:
+
+    cd /to/your/project
+    make 2>$LIBIGL/make.err
+    cd $LIBIGL
+    cat make.err | ./autoexplicit.sh
+    make clean
+    make
+
+
+### Benefits of static library
+
+* **Faster compile time**: Because the libigl library
+    is already compiled, only the new code in ones project must be
+    compiled and then linked to IGL. This means compile times are
+    generally faster.
+* **Debug or optimized**: The IGL static
+    library may be compiled in debug mode or optimized release mode
+    regardless of whether one's project is being optimized or
+    debugged.
+
+### Drawbacks of static library
+
+*  **Hard to use templates**: Special
+    care</a> (by the developers of the library) needs to be taken when
+    exposing templated functions.
+
+# Compressed .h/.cpp pair
+Calling the script:
+
+    scripts/compress.sh igl.h igl.cpp
+
+will create a single header `igl.h` and a single cpp file `igl.cpp`.
+
+Alternatively, you can also compress everything into a single header file:
+
+    scripts/compress.sh igl.h
+
+### Benefits of compressed .h/.cpp pair
+
+* **Easy incorporation**: This can be easily incorporated
+  into external projects.
+
+### Drawbacks of compressed .h/.cpp pair
+
+* **Hard to debug/edit**: The compressed files are
+  automatically generated. They're huge and should not be edited. Thus
+  debugging and editting are near impossible.
+
+* **Compounded dependencies**:
+  An immediate disadvantage of this
+  seems to be that even to use a single function (e.g.
+  `cotmatrix`), compiling and linking against
+  `igl.cpp` will require linking to all of `libigl`'s
+  dependencies (`OpenGL`, `GLUT`,
+  `AntTweakBar`, `BLAS`). However, because all
+  depencies other than Eigen should be encapsulated between
+  `#ifndef` guards (e.g. `#ifndef IGL_NO_OPENGL`, it
+  is possible to ignore certain functions that have such dependencies.</li>
+  <li><strong>Long compile:</strong> Compiling `igl.cpp` takes a long time and isn't easily parallelized (no `make -j12` equivalent).</li>
+  </ul>
+
+Here's a tiny test example using `igl.h` and `igl.cpp`. Save the following in `test.cpp`:
+
+    #include <igl.h>
+    #include <Eigen/Core>
+
+    int main(int argc, char * argv[])
+    {
+    Eigen::MatrixXd V;
+    Eigen::MatrixXi F;
+    return (argc>=2 &amp;&amp; igl::read_triangle_mesh(argv[1],V,F)?0:1);
+    }
+
+Then compile `igl.cpp` with:
+
+    g++ -o igl.o -c igl.cpp -I/opt/local/include/eigen3 -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR
+
+Notice that we're using `-DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR` to disable any libigl dependencies on OpenGL and AntTweakBar.
+
+Now compile `test.cpp` with:
+
+    g++ -g -I/opt/local/include/eigen3/ -I/usr/local/igl/libigl/ -L/usr/local/igl/libigl/ -ligl -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR -o test
+
+Try running it with:
+
+    ./test path/to/mesh.obj
+
+
+The following bash one-liner will find all source files that contain the string `OpenGL` but don't contain and `IGL_NO_OPENGL` guard:
+
+    grep OpenGL `grep -L IGL_NO_OPENGL include/igl/*`
+
+### Optional ###
+- OpenGL (disable with `IGL_NO_OPENGL`)
+    * OpenGL >= 4 (enable with `IGL_OPENGL_4`)
+- AntTweakBar  (disable with `IGL_NO_ANTTWEAKBAR`) Last tested 1.16 (see
+  `libigl/external/AntTweakBar`)
+- GLEW  Windows and Linux
+- OpenMP
+- libpng  libiglpng extra only
+- Mosek  libiglmosek extra only
+- Matlab  libiglmatlab extra only
+- boost  libiglboost, libiglcgal extra only
+- SSE/AVX  libiglsvd3x3 extra only
+- CGAL  libiglcgal extra only
+    * boost
+    * gmp
+    * mpfr
+- CoMiSo libcomiso extra only
+
+### Optional (included in external/) ###
+- TetGen  libigltetgen extra only
+- Embree  libiglembree extra only
+- tinyxml2  libiglxml extra only
+- glfw libviewer extra only
+- LIM  liblim extra only

+ 0 - 416
tutorial.html

@@ -1,416 +0,0 @@
-<html>
-  <head>
-    <title>libigl developer tutorial</title>
-    <link href="./style.css" rel="stylesheet" type="text/css">
-  </head>
-  <body>
-    <div id=fixed_sidebar>
-      <ul>
-        <li>
-          <a href=#header_library>Headers (.h) only library</a>
-          <ul>
-            <li><a href=#widget>IGL_HEADER_ONLY widget</a></li>
-            <li><a href=#header_benefits_drawbacks>Benefits and drawbacks</a></li>
-          </ul>
-        </li>
-        <li>
-          <a href=#static_library>Statically linked library (libigl.a)</a>
-          <ul>
-            <li><a href=#static_benefits_drawbacks>Benefits and drawbacks</a></li>
-          </ul>
-        </li>
-        <li>
-          <a href=#compress>Compressed igl.h/igl.cpp pair</a>
-          <ul>
-            <li><a href=#compress_benefits_drawbacks>Benefits and drawbacks</a></li>
-          </ul>
-        </li>
-        <li>
-          <a href=#dependencies>Dependencies</a>
-        </li>
-        <li><a href=#matlab>Conversion from matlab</a>
-      <ul>
-    </div>
-    <div id=container>
-    <div class=article_outer>
-    <div class=article_inner>
-      <a href=.><img src=libigl-logo.jpg alt="igl logo" class=center></a>
-      <h1>Using the libigl library</h1>
-      <p>
-        The <a href=.>libigl</a> library is a collection of useful/reusable/sharable C++ functions
-        with very few external <a href="#dependencies">dependencies</a>. The
-        library may be used as a <a href="#header_library">"headers only"
-        library</a>, a <a href=#static_library>statically linked library</a>, or as a compressed <a href="#compress">.h/.cpp pair</a>.
-      </p>
-
-      <p>
-        This duality between statically compiled and header-only is illustrated
-        in the example <code>examples/example_fun</code>. When built, this example
-        compiles two binaries, one using the <code>example_fun</code> routine of
-        the igl library, either as a headers-only library or linking against the
-        igl static library.
-      </p>
-
-      <h2 id=header_library>Headers (.h) only library</h2>
-      <p>
-        All classes and functions in the libigl library are written in a way in
-        which the entire library may be compiled <i>just-in-time</i>,
-        effectively behaiving as if it were a "headers only" library (like e.g.
-        Eigen). This is achieved by careful organization of each pair of .h and
-        .cpp files. To take advantage of this one must only include the path to
-        <code>libigl</code> directory in one's project's include path and
-        define the preprocessor macro <code>IGL_HEADER_ONLY</code>.
-      </p>
-
-      <p>
-        Defining <code>IGL_HEADER_ONLY</code> may be done at the project level,
-        prescribing that all included igl headers be treated as code that
-        should be inlined. Consequently all templated functions will be derived
-        at compile time if need be.
-      </p>
-
-      <p id=widget>
-        One may also define <code>IGL_HEADER_ONLY</code> not only on a per-file
-        basis, but a <i>per-include</i> basis. For example it may be useful for a
-        project to use the static library for most functionality from IGL, but then
-        include a certain IGL function as an inlined function. This may be achieved
-        by surrounding the relevant include with a define and undefine of the
-        <code>IGL_HEADER_ONLY</code> macro. Here's an example of the little
-        widget:
-      </p>
-      <pre><code>
-...
-#include &lt;igl/some_other_igl_function.h&gt;
-#ifdef IGL_STATIC_LIBRARY
-#  define IGL_HEADER_ONLY
-#  define IGL_HEADER_ONLY_WAS_NOT_DEFINED
-#endif
-#include &lt;igl/igl_function_to_inline.h&gt;
-#ifndef IGL_STATIC_LIBRARY_WAS_NOT_DEFINED
-#  undef IGL_HEADER_ONLY
-#endif
-#include &lt;igl/yet_another_igl_function.h&gt;
-...
-      </code></pre>
-      <span class=todo>example <code>examples/XXX</code> also highlights this
-      feature</span>
-
-      <div class=note>This practice is not recommended outside of debugging
-      purposes.</div>
-
-
-      <h3 id=header_benefits_drawbacks>Benefits of headers-only library</h3>
-      <ul>
-        <li><strong>Easy templates:</strong> When using the libigl library as a
-        headers-only library no special care need be taken when using templated
-        functions.</li>
-      </ul>
-      <h3>Drawbacks of headers-only library</h3>
-      <ul>
-        <li><strong>Inlining not guaranteed:</strong> Most compilers do not
-        guarantee that functions will get inlined even if explicitly told to do
-        so. Though we have not yet encountered this problem, it is always a
-        risk.</li>
-        <li><strong>Long compile, large binary:</strong>As a headers-only
-        library we depend on the compiler to properly inline each function
-        call. This means compile time is high and binary size can be quite
-        large.</li>
-      </ul>
-
-      <h2 id=static_library>Statically linked library</h2>
-        <h3 id=explicit_specialization_of_templated_functions>Explicit
-        specialization of templated functions</h3>
-        <p>
-          Special care must be taken by the developers of each function and
-          class in the libigl library that uses C++ templates. If this function
-          is intended to be compiled into the statically linked libigl library
-          then function is only compiled for each <i>explicitly</i> specialized
-          declaration. These should be added at the bottom of the corresponding
-          .cpp file surrounded by a <code>#ifdef IGL_STATIC_LIBRARY</code>.
-        </p>
-
-        <p>
-          Of course, a developer may not know ahead of time which
-          specializations should be explicitly included in the igl static lib.
-          One way to find out is to add one explicit specialization for each
-          call in one's own project. This only ever needs to be done once for
-          each template.
-        </p>
-
-        <p>
-          The process is somewhat mechanical using a linker with reasonable error
-          output.
-        </p>
-
-        <p>
-          Supposed for example we have compiled the igl static lib, including the
-          cat.h and cat.cpp functions, without any explicit instanciation. Say
-          using the makefile in the <code>libigl</code> directory:
-        </p>
-        <pre><code>
-cd $LIBIGL
-make
-        </code></pre>
-        <p>
-          Now if we try to compile a project and link against it we may get
-          an error like:
-        </p>
-        <pre><code>
-Undefined symbols for architecture x86_64:
-  "<span class=highlight>Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; igl::cat&lt;Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; &gt;(int, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&)</span>", referenced from:
-      uniform_sample(Eigen::Matrix&lt;double, -1, -1, 0, -1, -1&gt; const&, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&, int, double, Eigen::Matrix&lt;double, -1, -1, 0, -1, -1&gt;&)in Skinning.o
-  "Eigen::SparseMatrix&lt;double, 0, int&gt; igl::cat&lt;Eigen::SparseMatrix&lt;double, 0, int&gt; &gt;(int, Eigen::SparseMatrix&lt;double, 0, int&gt; const&, Eigen::SparseMatrix&lt;double, 0, int&gt; const&)", referenced from:
-      covariance_scatter_matrix(Eigen::Matrix&lt;double, -1, -1, 0, -1, -1&gt; const&, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&, ArapEnergy, Eigen::SparseMatrix&lt;double, 0, int&gt;&)in arap_dof.o
-      arap_rhs(Eigen::Matrix&lt;double, -1, -1, 0, -1, -1&gt; const&, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&, ArapEnergy, Eigen::SparseMatrix&lt;double, 0, int&gt;&)in arap_dof.o
-        </code></pre>
-        <p>
-          This looks like a mess, but luckily we don't really need to read it
-          all. Just copy the first highlighted part in quotes, then append it
-          to the list of explicit templat specializations at the end of
-          <code>cat.cpp</code> after the word
-          <strong><code>template</code></strong> and followed by a semi-colon.
-          Like this:
-        </p>
-        <pre><code>
-...
-#ifdef IGL_STATIC_LIBRARY
-  // Explicit template specialization
-  <strong>template</strong> <span class=highlight>Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; igl::cat&lt;Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; &gt;(int, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&, Eigen::Matrix&lt;int, -1, -1, 0, -1, -1&gt; const&)</span>;
-#endif
-        </code></pre>
-        <p>
-          Then you must recompile the IGL static library.
-        </p>
-        <pre><code>
-cd $LIBIGL
-make
-        </code></pre>
-        <p>
-          And try to compile your project again, potentially repeating this
-          process until no more symbols are undefined.
-        </p>
-
-        <div class=note>It may be useful to check that you code compiles with
-        no errors first using the <a href=#header_library>headers-only
-        version</a> to be sure that all errors are from missing template
-        specializations.</div>
-
-        <p>
-          If you're using make then the following command will
-          reveal each missing symbol on its own line:
-        </p>
-        <pre><code>
-make 2&gt;&1 | grep "referenced from" | sed -e "s/, referenced from.*//"
-        </code></pre>
-
-        <p>
-          Alternatively you can use the <code>autoexplicit.sh</code> function
-          which (for well organized .h/.cpp pairs in libigl) automatically
-          create explicit instanciations from your compiler's error messages.
-          Repeat this process until convergence:
-        </p>
-        <pre><code>
-cd /to/your/project
-make 2&gt;$LIBIGL/make.err
-cd $LIBIGL
-cat make.err | ./autoexplicit.sh
-make clean
-make
-        </code></pre>
-
-        <h3 id=static_benefits_drawbacks>Benefits of static library</h3>
-        <ul>
-          <li><strong>Faster compile time:</strong> Because the libigl library
-          is already compiled, only the new code in ones project must be
-          compiled and then linked to IGL. This means compile times are
-          generally faster.</li>
-          <li><strong>Debug <i>or</i> optimized:</strong> The IGL static
-          library may be compiled in debug mode or optimized release mode
-          regardless of whether one's project is being optimized or
-          debugged.</li>
-        </ul>
-        <h3>Drawbacks of static library</h3>
-        <ul>
-          <li><strong>Hard to use templates:</strong> <a
-          href="#explicit_specialization_of_templated_functions">Special
-          care</a> (by the developers of the library) needs to be taken when
-          exposing templated functions.</li>
-        </ul>
-
-      <h2 id=compress>Compressed .h/.cpp pair</h2>
-      <p>Calling the script:</p>
-      <pre><code>scripts/compress.sh igl.h igl.cpp</code></pre>
-      <p>will create a single header
-      <code>igl.h</code> and a single cpp file <code>igl.cpp</code>.
-
-      <p>Alternatively, you can also compress everything into a single header file (analagous to IGL_HEADER_ONLY):</p>
-      <pre><code>scripts/compress.sh igl.h</code></pre>
-
-      <h3 id=compress_benefits_drawbacks>Benefits of compressed .h/.cpp pair</h3>
-      <ul>
-        <li><strong>Easy incorporation:</strong> This can be easily incorporated
-        into external projects.</li>
-      </ul>
-      <h3>Drawbacks of compressed .h/.cpp pair</h3>
-      <ul>
-        <li><strong>Hard to debug/edit:</strong> The compressed files are
-        automatically generated. They're huge and should not be edited. Thus
-        debugging and editting are near impossible.</li>
-        <li><strong>Compounded dependencies:</strong>
-        An immediate disadvantage of this
-        seems to be that even to use a single function (e.g.
-        <code>cotmatrix</code>), compiling and linking against
-        <code>igl.cpp</code> will require linking to all of <code>libigl</code>'s
-        dependencies (<code>OpenGL</code>, <code>GLUT</code>,
-        <code>AntTweakBar</code>, <code>BLAS</code>). However, because all
-        depencies other than Eigen should be encapsulated between
-        <code>#ifndef</code> guards (e.g. <code>#ifndef IGL_NO_OPENGL</code>, it
-        is possible to ignore certain functions that have such dependencies.</li>
-        <li><strong>Long compile:</strong> Compiling <code>igl.cpp</code> takes a long time and isn't easily parallelized (no <code>make -j12</code> equivalent).</li>
-      </ul>
-
-      <p>Here's a tiny test example using <code>igl.h</code> and <code>igl.cpp</code>. Save the following in <code>test.cpp</code>:</p>
-      <pre><code>
-#include &lt;igl.h&gt;
-#include &lt;Eigen/Core&gt;
-
-int main(int argc, char * argv[])
-{
-  Eigen::MatrixXd V;
-  Eigen::MatrixXi F;
-  return (argc&gt;=2 &amp;&amp; igl::read_triangle_mesh(argv[1],V,F)?0:1);
-}
-      </code></pre>
-      <p>Then compile <code>igl.cpp</code> with:
-      <pre><code>
-g++ -o igl.o -c igl.cpp -I/opt/local/include/eigen3 -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR
-      </code></pre>
-      <p>Notice that we're using <code>-DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR</code> to disable any libigl dependencies on OpenGL and AntTweakBar.</p>
-
-      <p>Now compile <code>test.cpp</code> with:
-      <pre><code>
-g++ -g -I/opt/local/include/eigen3/ -I/usr/local/igl/libigl/ -L/usr/local/igl/libigl/ -ligl -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR -o test
-      </code></pre>
-
-      <p>Try running it with:</p>
-      <pre><code>
-./test path/to/mesh.obj
-      </code></pre>
-
-      <p>The following bash one-liner will find all source files that contain the string <code>OpenGL</code> but don't contain and <code>IGL_NO_OPENGL</code> guard:
-      <pre><code>
-grep OpenGL `grep -L IGL_NO_OPENGL include/igl/*`
-      </code></pre>
-
-      <h2 id="dependencies">Dependencies</h2>
-      <p>
-        By design the libigl library has very few external dependencies.
-      </p>
-        <h3>Mandatory dependencies</h3>
-        <p> <a href=http://eigen.tuxfamily.org/>Eigen3</a> and the Standard
-        Template Library (STL) are the only truly mandatory dependencies.
-        Without them libigl will not compile or work properly.</p>
-        <p> OpenGL is an <i>assumed</i> dependency, but is in fact also
-        optional. All OpenGL-dependent functions may be disabled by defining
-        the <code>IGL_NO_OPENGL</code> preprocessor macro.</p>
-        </p>
-        <p> Likewise,
-          <a href="http://www.antisphere.com/Wiki/tools:anttweakbar">AntTweakBar</a>
-          is an
-        <i>assumed</i> dependency, similarly diabled by defining
-        the <code>IGL_NO_ANTTWEAKBAR</code> preprocessor macro.</p>
-
-        <p><span class=todo>Each IGL_NO_XXX should just be replaced by a libiglXXX.a extra</span></p>
-        <h3>Optional dependencies</h3>
-        <p>
-          Certain <i>extra</i> functions and classes included the libigl
-          library have external dependencies by construction (e.g. the
-          matlab_interface routines are only useful when matlab is present
-          anyway). These are <strong>never</strong> compiled by default into
-          the static igl library, rather they are compiled as "extras" (e.g.
-          libiglmatlab.a contains the MATLAB-dependent functions).
-        </p>
-        <p>Currently these include:<p>
-        <table>
-          <tr class=header><th>Extra</th><th>Dependency</th></tr>
-          <tr class=d0><td>libiglmatlab.a</td><td>MATLAB</td></tr>
-          <tr class=d1><td>libiglmosek.a</td><td>Mosek</td></tr>
-          <tr class=d0><td>libigltetgen.a</td><td>TetGen</td></tr>
-          <tr class=d1><td>libiglxml.a</td><td>TinyXml2</td></tr>
-          <tr class=d0><td>libiglpng.a</td><td>LibPNG</td></tr>
-          <tr class=d1><td>libiglembree.a</td><td>Embree</td></tr>
-        </table>
-        <p>Some of our examples (<code>libigl/examples</code>) also depend on GLUT.</p>
-
-      <h2 id=matlab>Converting matlab code to C++ using IGL and Eigen</h2>
-      <p>
-        Eigen's matrix API often makes it fairly to translate to and from
-        matlab code (Eigen provides a <a
-        href=http://eigen.tuxfamily.org/dox/AsciiQuickReference.txt>
-        translation table</a>). We have implemented a few additional
-        matlab-esque functions to make the translation even easier. <a
-        href="matlab-to-eigen.html">Our own translation table</a> shows a list
-        of common matlab functions and their igl-eigen equivalents.
-      </p>
-
-      <h3>Including OpenGL</h3>
-      <p>Just include the convenience header, which takes care of system dependent paths, <code>glew</code>, etc.:</p>
-      <pre><code>
-#include "OpenGL_convenience.h"
-      </code></pre>
-      <!--<p>Likewise for GLUT:</p>
-      <pre><code>
-#include "GLUT_convenience.h"
-      </code></pre>-->
-      <del>
-      <p>
-      A standard include for the OpenGL headers should be placed in the .cpp file if possible. To ensure compilability on Mac OS X, Windows and Linux, use:
-      <pre><code>
-#if __APPLE__
-#  include &lt;OpenGL/gl.h&gt;
-#elif defined(_WIN32)
-#    define NOMINMAX
-#    include &lt;Windows.h&gt;
-#    undef NOMINMAX
-#    include &lt;GL/glew.h&gt;
-#    include &lt;GL/gl.h&gt;
-#else
-#  define GL_GLEXT_PROTOTYPES
-#  include &lt;GL/gl.h&gt;
-#  include &lt;GL/glext.h&gt;
-#endif
-      </code></pre>
-      </p>
-      </del>
-      <h3>Including headers to other igl functions</h3>
-      <p>
-      Source files in the main igl directory should include other libigl headers using the name of the file in quotation marks:
-      </p>
-      <pre><code>
-#include "other_function.h"
-      </code></pre>
-
-      <p>
-      Source files in your project and in libigl <i>extras</i> should include libigl headers using the igl directory and name file in angle brackets:
-      </p>
-      <pre><code>
-#include &lt;igl/some_function.h&gt;
-      </code></pre>
-      <p>
-      libigl headers of extras can then be included using:
-      </p>
-      <pre><code>
-#include &lt;igl/extra/some_extra_function.h&gt;
-      </code></pre>
-
-
-      <hr>
-      <p>See also: <a href=style_guidelines.html>style guidlines</a>, <a
-      href=doc.html>auto-documentation</a>, <a
-      href=file-formats/index.html>file formats</a></p>
-
-  </div>
-  </div>
-  </div>
-  </body>
-</html>