Difference between revisions of "Lib2geom"

From Inkscape Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
I've started this page on the Inkscape Wiki to help the lib2geom team with some developer documentation. As this material matures it can be moved to the "Developer Documentation" section of the wiki instead of where it currently resides. (2006-09-01 Scott Huey)


[[lib2geom Goals]]
== What is lib2geom? ==


[[lib2geom FAQ]]
[https://gitlab.com/inkscape/lib2geom lib2geom] (2Geom in private life) was initially a library developed for Inkscape, but it can provide a robust computational geometry framework for any application. It is not a rendering library, instead concentrating on high level algorithms such as computing arc length.


[[WorkingWith2GeomFAQ]]: reallife questions answered about using 2Geom in real code
== Design Decisions ==
* Small, algebraic objects (Point/Matrix) will be mutable, whereas large objects like a pathset will be immutable.  <justification here>
* We are using an original development method we've dubbed "Toy Driven Development".  Under this process graphical toys are implemented which allow playing with the features of the library.


[[lib2geom SVN Repository Guide]]
== Quick Feature List ==


(not complete)


[[lib2geom py2geom]]
* C++
* Functional programming style.
* Points
* Efficient affine transformations
* Rectangles
* Convex Hulls
* Bounded error
* General purpose paths:
** Exact elliptical arcs
** Area
** Centroid and bending moments
* Path Locations:
** Determination of special spots (e.g. maximum curvature)
** Splitting
** 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
 
 
 
== Links ==
 
[[WorkingWith2GeomFAQ]]: real-life questions answered about using <code>2Geom</code> in real code
 
[[lib2geom py2geom]]: Python bindings to <code>2geom</code>. With this you can use the power of <code>2geom</code> in Python scripts.
 
https://sourceforge.net/p/lib2geom/wiki: 2geom wiki site on SourceForge (obsolescent)
 
https://gitlab.com/inkscape/lib2geom/: Official source code for the project

Latest revision as of 00:54, 12 November 2018

What is lib2geom?

lib2geom (2Geom in private life) was initially a library developed for Inkscape, but it can provide a robust computational geometry framework for any application. It is not a rendering library, instead concentrating on high level algorithms such as computing arc length.

Design Decisions

  • Small, algebraic objects (Point/Matrix) will be mutable, whereas large objects like a pathset will be immutable. <justification here>
  • We are using an original development method we've dubbed "Toy Driven Development". Under this process graphical toys are implemented which allow playing with the features of the library.

Quick Feature List

(not complete)

  • C++
  • Functional programming style.
  • Points
  • Efficient affine transformations
  • Rectangles
  • Convex Hulls
  • Bounded error
  • General purpose paths:
    • Exact elliptical arcs
    • Area
    • Centroid and bending moments
  • Path Locations:
    • Determination of special spots (e.g. maximum curvature)
    • Splitting
    • 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


Links

WorkingWith2GeomFAQ: real-life questions answered about using 2Geom in real code

lib2geom py2geom: Python bindings to 2geom. With this you can use the power of 2geom in Python scripts.

https://sourceforge.net/p/lib2geom/wiki: 2geom wiki site on SourceForge (obsolescent)

https://gitlab.com/inkscape/lib2geom/: Official source code for the project