math2d

A collection of math utilities for 2D lines, bezier curves and arrangements made of them.

(work in progress)

Version 0.0.0

09-Oct-2019

program source

github

About

This is a not yet finished collection of math utilities required to deal with polygons or so called arrangements consisting of 2D lines and bezier curves. It is still under heavy development and I do not suggest to use it in its current state.

Major difference to existing math libraries is a method to define the required precision of calculated results.

Features and Development Progress

FeatureProgress
Basic Math
root finding for polynomials up to 4th degree90%
numerical root finding algorithm based on Newton-Raphson100%
Lines
intersection point of line and ray100%
intersection point of line segments100%
test if point on on line segment100%
determine superposing section of two line segments100%
determine graphical relationship of two line segments100%
Bezier Curves
intersection points with line segment100%
intersection points of two bezier curves80%
intersection points of one bezier curve with itself80%
extrema in respect to X and Y100%
inflection point100%
split curve at arbitrary point100%
merge two adjacent curves100%
Arrangements of Lines (Polygons)
planarise (split segments at intersections)97%
identify faces and holes (even-odd and non-zero rule)97%
triangulate faces97%
Arrangements of Lines and Curves
planarise0%
identify faces and holes0%
triangulate faces0%
separate curved outline from inner polygon0%
Final Tasks
Source Cleanup/Refactoring0%
Documentation0%