Author Topic: 2Geom: easy C++ 2D graphics library  (Read 773 times)

0 Members and 1 Guest are viewing this topic.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1952
    • View Profile
2Geom: easy C++ 2D graphics library
« on: November 12, 2018, 05:25:26 PM »
What is this?
2Geom is a C++ 2D geometry library geared towards robust processing of computational geometry data associated with vector graphics. The primary design consideration is ease of use and clarity. It is dual-licensed under LGPL 2.1 and MPL 1.1.

The library is descended from a set of geometric routines present in Inkscape, a vector graphics editor based around the Scalable Vector Graphics format, the most widespread vector graphics interchange format on the Web and a W3C Recommendation. Due to this legacy, not all parts of the API form a coherent whole (yet).

Rendering is outside the scope of this library, and it is assumed something like libcairo or similar is employed for this. 2geom concentrates on higher level algorithms and geometric computations.

Features List
    Functional programming style.
    Efficient affine transformations
    Convex Hulls
    Bounded error
    General purpose paths:
        Exact elliptical arcs
        Centroid and bending moments
    Path Locations:
        Determination of special spots (e.g. maximum curvature)
        Point, tangent, curvature at location
        Efficient arc length and inverse arc length
    Path algebra:
        Computations such as offset curves can be written with their mathematical definition and still get a bounded error,
        efficient curve. (preliminary trials indicate offset done this way out performs the method used in Inkscape)
    Arbitrary distortion (with bounded error):
        Mesh distorts
        Computational distorts such as the GIMP's 'vortex' plugin
        3d mapping (perspective, flag, sphere)
    Exact boolean ops (elliptic arcs remain elliptic arcs)
    Efficient 2d database
    Implicit function plotting
    NURBs input and output
    Tunable path simplification
    PDoF constraint system for CAD/CAGD

- Graphics Math Library 2geom's First Release Available For Use Beyond Inkscape
- 2Geom @ github
- Inkscape homepage