Skip to content

Files

Latest commit

0cf6422 · Sep 26, 2012

History

History
31 lines (21 loc) · 1.61 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.61 KB

Simulation of simplicity analysis and code generation

simplicity is an automatic code generator for Simulation of Simplicity (SoS), a technique for avoiding degeneracies in exact geometric computation. Given a geometric predicate such as the determinant of a small matrix, SoS adds different infinitesimal shifts to each input variable. Even if the original predicate evaluates to zero, the infinitesimal shifts guarantee a (possibly infinitesimal) nonzero value. Thus, algorithms which make use of SoS predicates can pretend that degeneracies never occur. For more details on the underlying technique, see

There are two dependencies:

  • other/core: Otherlab core library (BSD license)
  • sage: Open source symbolic mathematics (GPLv2)

The Python code generation scripts themselves depend only on sage, and are therefore GPL. The generated C++ code is not GPL for the same reason that code compiled with gcc is not GPL: the generated code does link or include sage either directly or indirectly. Therefore, the generated code is safe for inclusion in BSD licensed libraries such as other/core (see other/core/exact/predicates.*).

Usage

To generate predicates.h and predicates.cpp in directory <dir>, run

./simplicity.py <dir>

For example, to regenerate the predicate code in other/core/exact, do

./simplicity.py $OTHER/core/exact