New in CGAL: 3D Generalized Barycentric Coordinates

CGAL/cgal

New in CGAL: 3D Generalized Barycentric Coordinates


Antonio Gomes, Dmitry Anisimov


The upcoming CGAL release 6.2, will introduce the package 3D Generalized Barycentric Coordinates. A first version was implemented during Google Summer of Code. The 3D package complements the existing 2D package. Barycentric coordinates are a fundamental tool in geometry processing, interpolation, and deformation. While classical barycentric coordinates are defined with respect to simplices, many modern applications require coordinates over more general polyhedral shapes. This package implements several widely used closed-form formulations, including Wachspress, discrete harmonic, and mean value coordinates, all adapted to convex 3D polyhedra with triangular faces.




Wachspress, discrete harmonic, mean value, and harmonic coordinate functions for a convex polygon plotted with respect to the marked vertex.


One application of barycentric coordinates is shape deformation. The barycentric coordinates of vertex positions of an input object are calculated with respect to an enclosing convex polyhedron, e.g., a bounding box. The deformed object can then be obtained by retrieving the vertex positions deforming the enclosing polyhedron.




A sphere deformed by using a deformed bounding box as reference.


Status

The package 3D Generalized Barycentric Coordinates is already integrated in CGAL's "main" branch on the CGAL GitHub repository, and will be officially released in the upcoming version of CGAL, CGAL 6.2, scheduled for June 2026.

Documentation of the package Barycentric_coordinates_3
CGAL “main” branch on GitHub