geometry

Library for extending MatGeom functionality.

Select category:

2D Polylines

clipPolyline
CLIPPOLYLINE Clip an open polyline with a rectangular box.
clipPolyline_clipper
Clip (possibly composite) polylines with polygon(s) using one of boolean methods.
simplifyPolyline_geometry
Simplify or subsample a polyline using the Ramer-Douglas-Peucker algorithm, a.k.a. the iterative end-point fit algorithm or the split-and-merge algorithm.

2D Ellipses

cov2ellipse
Calculates ellipse parameters from covariance matrix.
ellipse2cov
Calculates covariance matrix from ellipse.

2D Polygons

clipPolygon
CLIPPOLYGON Clip a polygon with a rectangular box.
clipPolygon_clipper
Perform boolean operation on polygon(s) using the Clipper library.
clipPolygon_mrf
Perform boolean operation on polygon(s) using the algorithm by Martinez, Rueda and Feito.
drawFilledPolygon
Draw a filled polygon.
ispolycw
Returns true if the polygon P are oriented Clockwise.
ispolyccw
Returns true if the polygon P are oriented Counter-Clockwise.
isPolygonCCW
Returns true if the polygon P are oriented Counter-Clockwise.
isPolygonCW_Clipper
Inspect winding direction of polygon(s).
joinPolygons
Convert a cell style set of polygons into an array of subpolygons separated by NaN rows.
orientPolygon
Orient polygon counterclockwise or clockwise.
polygon2patch
Connect outer (filled) polygon and inner (hole) polygons using branch cuts such that all polygons are connected as one string of vertices, for subsequent plotting polygons with holes using the func...
polygon2shape
Converts a polygon to a shape with edges defined by smooth polynomials.
poly2ccw
Convert Polygons to counterclockwise contours(polygons).
poly2cw
Convert Polygons to clockwise contours(polygons).
simplifyPolygon_geometry
Simplify a polygon using the Ramer-Douglas-Peucker algorithm.

2D Piecewise polynomial shapes

curveval
Evaluates parametric CURVE at T.
curve2polyline
Adaptive sampling of a parametric curve.
plotShape
Plots a 2D shape defined by piecewise smooth polynomials in the current axis.
polygon2shape
Converts a polygon to a shape with edges defined by smooth polynomials.
shape2polygon
Transforms a 2D shape described by piecewise smooth polynomials into a polygon.
shapeCentroid
Centroid of a simple plane shape defined with piecewise smooth polynomials.
transformShape
Applies transformation to a shape defined by piecewise smooth polynomials.

2D Others

beltProblem
Finds the four lines tangent to two circles with given centers and radii.

Input [broken]

@svg/svg
Create object of the svg class.
@svg/plot
Plots and SVG object.
@svg/getpath
Returns paths in IDS.
@svg/path2polygon
Converts the SVG path to an array of polygons.
@svg/normalize
normalizes and SVG.
@svg/pathid
Not implemented.
@svg/height
Not implemented.
@svg/width
Not implemented.

Output

data2geo
Uses data to build a file compatible with Gmsh.

Package: geometry