Geogram: Programming Library with Geometric Algorithms
Thank you very much for discussing about geogram !
To answer some of the questions I see in the comments:<p>TL;DR: if you need a generalist library, use CGAL or libigl, if you have very specific needs of performance &#x2F; compactness of the code &#x2F; low memory consumption for specific functionalities, then you may need Geogram.<p><i>1) comparison between geogram and other libraries (CGAL, libigl)</i><p>Is is very difficult to compare different &quot;swiss army knives&quot; that have a completely different set of blades. Geogram specificities are:<p>- focusing on a small set of algorithms and use cases, and optimizing them  (whereas the other libraries are more general-use). This includes:<p>- Delaunay&#x2F;Voronoi&#x2F;Power diagrams in 2D and 3D, with optional periodic conditions. For instance, it is used in my research on cosmology, that has diagrams of astronomical size, with hundred millions points (the other libraries no longer fit in memory). The price to pay: geogram does not support vertex suppression (if you need that, you can use CGAL).<p>- Mesh parameterization and segmentation, texture generation<p>- Baking (transfer attributes between textured meshes &#x2F; generate normal maps)<p>- Mesh repair<p>- Remeshing<p>- Restricted Voronoi diagrams for surfaces and volumes embedded in space of arbitrary dimension. Not everybody will need that, but it is used internally by the surface remesher (that works in dimension 6)<p>- Semi-discrete optimal transport<p>Some features are presented here: <a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki#mini-tutorials-and-example-programs">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki#mini-tutorials-and...</a>
It does not have mesh deformation (you can use libIGL if you need them)<p>It also has lower-level components:<p>- sparse linear solver OpenNL CPU&#x2F;GPU<p>- easy-to-use 3D graphics API on top of OpenGL3<p>- minimalist framework around Dear ImGui to develop applications with GUIs<p>- focusing on portability and ease of compilation
Geogram works on Linux&#x2F;Mac&#x2F;Windows&#x2F;Emscripten&#x2F;Android<p>You can run some demos in your browser (thanks to Emscripten):
<a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki&#x2F;compiling_Emscripten#examples">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki&#x2F;compiling_Emscript...</a><p>- programming API and design choices<p>Geogram has nearly no dependency. Geogram does not use Boost (that I don&#x27;t like, I find it too heavy, that&#x27;s personal choice). Geogram is not a &quot;header only&quot; library and moderately uses modern C++ constructs. Design choices are explained in this presentation: <a href="https:&#x2F;&#x2F;fr.slideshare.net&#x2F;BrunoLevy4&#x2F;the-joy-of-computer-graphics-programming" rel="nofollow">https:&#x2F;&#x2F;fr.slideshare.net&#x2F;BrunoLevy4&#x2F;the-joy-of-computer-gra...</a><p>In the end, the compiled library is very small (a few megabytes) and can be easily embedded in other applications (a list here of usages in industry and academy: <a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki&#x2F;Publications">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram&#x2F;wiki&#x2F;Publications</a>)<p>- It has an interactive application here: <a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;GraphiteThree">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;GraphiteThree</a> (you can load your meshes, repair them, remesh them etc...)<p><i>2) Does it support exact geometric computations ?</i><p>Of course ! It has exact predicates and exact geometric constructs. They are implemented using arithmetic expansions (<a href="https:&#x2F;&#x2F;brunolevy.github.io&#x2F;geogram&#x2F;multi__precision_8h.html" rel="nofollow">https:&#x2F;&#x2F;brunolevy.github.io&#x2F;geogram&#x2F;multi__precision_8h.html</a>) (that uses array of doubles internally), and it is fast. It has its tool to automatically generate exact geometric predicates from their formulas.<p><i>3) Boolean operations ?</i><p>They are on their way (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;BrunoLevy01&#x2F;status&#x2F;1623347815307960321" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;BrunoLevy01&#x2F;status&#x2F;1623347815307960321</a>). Current version is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;Experiment">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;Experiment</a> (Graphite plugin). Most models from Thingy10K are OK, currently focussing on a couple of &quot;monsters&quot; that push the limit.<p><i>4) I want to only use a subset of the library</i><p>Geogram has a system to extract &quot;pluggable software modules&quot;, that is, a .h&#x2F;.cpp pair with a single functionality. There are PSMs for:<p>- exact arithmetics and predicates
<a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.Predicates">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.Predicates</a><p>- Delaunay triangulations
<a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.Delaunay">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.Delaunay</a><p>- OpenNL linear solver (CPU and GPU)
<a href="https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.OpenNL">https:&#x2F;&#x2F;github.com&#x2F;BrunoLevy&#x2F;geogram.psm.OpenNL</a>