Archives for posts with tag: math

Pimath is a boost.python binding for the IMath library that is part of the OpenEXR project.

Pimath binds the Imath API as closely as possible. Each hpp file contains a comment block at the top, highlighting cases where the bindings differ and why. Common reasons include:

Making a function signature more Pythonic;
Removing slightly optimised functions (where the overhead of python itself would vastly outweigh the optimisation);
Removing API redundancy;
Changing misleading Imath function names (rare).
Nice things about pimath:

It provides integral template instantiations where possible – eg V3i;
It provides ‘half’ template instantiations where possible – eg M33h;
It provides to- and from-python conversion for the Imath ‘half’ type;
It spreads type instantiation over several cpp files for quick multithreaded compiling.
It’s organised as a mirror image of Imath – it has corresponding headers, and a free function in Imath is a free function in pimath. If you know Imath, you know pimath.

Project Page: http://code.google.com/p/pimath/
Language: C++, python
Platform: All
License: New BSD Licence
Sponsor: Dr. D. Studios

Arithmetic expressions appear in almost every animation system ever created. Being able to embed an expression language in a piece of custom software allows an amazing degree of artistic freedom. At Disney artists have enjoyed using expressions because they allow just enough flexibility without being overwhelming to non-programmer users. Developers have enjoyed them too for quick prototyping and deployment of fixes to production needs.

History

At Disney there have been various expression languages. SeExpr started as a language for our procedural geometry instancing tool, XGen. Work was done to generalize it into something that could be used in other contexts. Later it was integrated into paint3d, our texture painting facility, which opened the door to procedural synthesis. More recently, we have integrated it as a way of defining procedural controls to physical dynamical simulations and render time particle instancing.

Expressions can be seen as a way of allowing customization of inner loops. This is contrast to scripting which is mostly aimed at gluing large parts of code base together. So in this sense, C++ forms the center of your application, python could be used to put pieces of it together, and SeExpr is used to customize tight inner loops.

Major Features

  • Arithmetic expression of scalar/vector types
  • Large library of builtin functions
  • Extensible variables and functions (including with DSOs)
  • Simple to embed in any program

Home Page: http://www.disneyanimation.com/technology/seexpr.html
Project Page: http://github.com/wdas/seexpr/
Language: C++
Platform: Linux, OSX, Windows
License: New BSD
Sponsor: Walt Disney Animation Studios

GTS stands for the GNU Triangulated Surface Library. It is an Open Source Free Software Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles.

The code is written entirely in C with an object-oriented approach based mostly on the design of GTK+. Careful attention is paid to performance related issues as the initial goal of GTS is to provide a simple and efficient library to scientists dealing with 3D computational surface meshes. (more…)

Home Page: http://gts.sourceforge.net/
Project Page: http://sourceforge.net/projects/gts/
Language: C
Platform: Linux, Windows, OS X
License: LGPL

The Computational Geometry Algorithms Library (CGAL) offers data structures and algorithms like triangulations (2D constrained triangulations and Delaunay triangulations in 2D and 3D, periodic triangulations in 3D), Voronoi diagrams (for 2D and 3D points, 2D additively weighted Voronoi diagrams, and segment Voronoi diagrams), polygons (Boolean operations, offsets, straight skeleton), polyhedra (Boolean operations), arrangements of curves and their applications (2D and 3D envelopes, Minkowski sums), mesh generation (2D Delaunay mesh generation and 3D surface and volume mesh generation, skin surfaces), geometry processing (surface mesh simplification, subdivision and parameterization, as well as estimation of local differential properties, and approximation of ridges and umbilics), alpha shapes, convex hull algorithms (in 2D, 3D and dD), search structures (kd trees for nearest neighbor search, and range and segment trees), interpolation (natural neighbor interpolation and placement of streamlines), shape analysis, fitting, and distances (smallest enclosing sphere of points or spheres, smallest enclosing ellipsoid of points, principal component analysis), and kinetic data structures.

Home Page: http://www.cgal.org/
Project Page: http://www.cgal.org/
Language: C++
Platform: Linux, Mac OS X, Windows
License: LGPL or QPL (if used for open source projects, or proprietary projects that are internal to the studio), or a commercial license (if distributed in a commercial product).