You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
matGeom
MatGeom
Matlab library geometric computing in 2D/3D.
MatGeom is a library for geometric computing with Matlab in 2D and 3D. It contains several hundreds of functions for the creation and manipulation of 2D and 3D shapes such as point sets, lines, polygons, ellipses, 3D meshes, and other shapes.
The MatGeom lirbary corresponds to the concatenation of the "geom2d" and "geom3d" libraries that were distributed on the FileExchange. Distribution as a single library greatly facilitates the interoperability of the functions.
The official homepage for the project is http://github.com/mattools/matGeom. A user manual is available.
Starting from February 2022, the html pages of the functions (obtained with m2html) are available here.
Package organization
The library is organized into several modules:
- geom2d - General functions in Euclidean plane
- polygons2d - Functions operating on polygons and polylines represented as list of vertices
- graphs - Manipulation of geometric graphs
- geom3d - General functions in 3D Euclidean space
- meshes3d - Manipulation of 3D polygonal meshes (trimesh, quadmesh, or more generic meshes)
Cite As
David Legland (2023). matGeom (https://github.com/mattools/matGeom/releases/tag/v1.2.5), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCommunity Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
demos/geom2d/triangle
demos/geom3d
- demoDrawArrow3d
- demoDrawLine3d
- demoDrawPlane3d
- demoDrawPoint3d
- demoEquivalentEllipsoid
- demoGeodesicCylinder
- demoProjPointOnCircle3d
- demoProjPointOnCylinder
- demoTransformPoint3d
demos/meshes3d
matGeom
matGeom/deprecated/geom2d
- circleArcAsCurve
- circleAsPolygon
- clipLineRect
- createMedian
- drawRect2
- ellipseAsPolygon
- formatAngle
- homothecy
- inCircle
- invertLine
- lineSymmetry
- minDistance
- onCircle
- onEdge
- onLine
- onRay
- rotation
- scaling
- translation
matGeom/deprecated/geom3d
- createEulerAnglesRotation
- drawCurve3d
- inertiaEllipsoid
- intersectPlaneLine
- normalize3d
- point3dBounds
- rotationOx
- rotationOy
- rotationOz
- scale3d
- scaling3d
- translation3d
- vecnorm3d
matGeom/deprecated/graphs
matGeom/deprecated/meshes3d
matGeom/deprecated/polygons2d
matGeom/geom2d
- angle2Points
- angle3Points
- angleAbsDiff
- angleDiff
- angles2d
- angleSort
- bisector
- boundingBox
- boxes2d
- boxToPolygon
- boxToRect
- cartesianLine
- centeredEdgeToEdge
- centroid
- circleArcToPolyline
- circles2d
- circleToPolygon
- circumCenter
- circumCircle
- clipEdge
- clipLine
- clipPoints
- clipRay
- Contents.m
- crackPattern
- crackPattern2
- createBasisTransform
- createCircle
- createDirectedCircle
- createEdge
- createHomothecy
- createLine
- createLineReflection
- createRay
- createRotation
- createRotation90
- createScaling
- createTranslation
- createVector
- cubicBezierToPolyline
- distancePointEdge
- distancePointLine
- distancePoints
- drawArrow
- drawBezierCurve
- drawBox
- drawCenteredEdge
- drawCircle
- drawCircleArc
- drawEdge
- drawEllipse
- drawEllipseArc
- drawLabels
- drawLine
- drawOrientedBox
- drawParabola
- drawPoint
- drawRay
- drawRect
- drawShape
- drawVector
- edgeAngle
- edgeLength
- edgePosition
- edges2d
- edgeToLine
- edgeToPolyline
- ellipsePerimeter
- ellipses2d
- ellipseToPolygon
- enclosingCircle
- equivalentEllipse
- findClosestPoint
- fitAffineTransform2d
- fitPolynomialTransform2d
- hausdorffDistance
- hexagonalGrid
- inertiaEllipse
- intersectBoxes
- intersectCircles
- intersectEdges
- intersectLineCircle
- intersectLineEdge
- intersectLines
- isCounterClockwise
- isLeftOriented
- isParallel
- isPerpendicular
- isPointInCircle
- isPointInEllipse
- isPointInTriangle
- isPointOnCircle
- isPointOnEdge
- isPointOnLine
- isPointOnRay
- lineAngle
- lineFit
- linePosition
- lines2d
- lineToEdge
- medianLine
- mergeBoxes
- mergeClosePoints
- midPoint
- minDistancePoints
- nndist
- normalize
- normalizeAngle
- normalizeVector
- orientedBox
- orientedBoxToPolygon
- orthogonalLine
- parallelEdge
- parallelLine
- pointOnLine
- points2d
- polarPoint
- polynomialTransform2d
- principalAxes
- principalAxesTransform
- projPointOnLine
- radicalAxis
- randomPointInBox
- rays2d
- rectToBox
- rectToPolygon
- registerICP
- reverseEdge
- reverseLine
- rotateVector
- squareGrid
- transformEdge
- transformLine
- transformPoint
- transforms2d
- transformVector
- triangleArea
- triangleGrid
- vectorAngle
- vectorNorm
- vectors2d
matGeom/geom2d/private
matGeom/geom3d
- anglePoints3d
- angles3d
- angleSort3d
- boundingBox3d
- box3dVolume
- boxes3d
- cart2cyl
- cart2sph2
- cart2sph2d
- circle3dOrigin
- circle3dPoint
- circle3dPosition
- circles3d
- clipConvexPolygon3dHP
- clipEdge3d
- clipLine3d
- clipPlane
- clipPoints3d
- clipPolygon3dHP
- clipRay3d
- composeTransforms3d
- Contents.m
- createBasisTransform3d
- createEdge3d
- createLine3d
- createPlane
- createRay3d
- createRotation3dLineAngle
- createRotationAboutPoint3d
- createRotationOx
- createRotationOy
- createRotationOz
- createRotationVector3d
- createRotationVectorPoint3d
- createScaling3d
- createSphere
- createTranslation3d
- crossProduct3d
- cyl2cart
- cylinderSurfaceArea
- dihedralAngle
- distanceLines3d
- distancePointEdge3d
- distancePointLine3d
- distancePointPlane
- distancePoints3d
- distancePointTriangle3d
- drawAngleBetweenVectors3d
- drawArrow3d
- drawAxis3d
- drawAxisCube
- drawBox3d
- drawCapsule
- drawCircle3d
- drawCircleArc3d
- drawCube
- drawCuboid
- drawCylinder
- drawDome
- drawEdge3d
- drawEllipse3d
- drawEllipseCylinder
- drawEllipsoid
- drawGrid3d
- drawLabels3d
- drawLine3d
- drawPartialPatch
- drawPlane3d
- drawPlatform
- drawPoint3d
- drawPolygon3d
- drawPolyline3d
- drawRay3d
- drawSphere
- drawSphericalEdge
- drawSphericalPolygon
- drawSphericalTriangle
- drawSurfPatch
- drawTorus
- drawVector3d
- edgeLength3d
- edges3d
- edgeToLine3d
- ellipsoidSurfaceArea
- equivalentEllipsoid
- eulerAnglesToRotation3d
- fillPolygon3d
- fillSphericalPolygon
- fillSphericalTriangle
- fitAffineTransform3d
- fitCircle3d
- fitEllipse3d
- fitLine3d
- fitPlane
- fitSphere
- geodesicCylinder
- hypot3
- intersectBoxes3d
- intersectEdgePlane
- intersectEdgePolygon3d
- intersectLineCylinder
- intersectLinePlane
- intersectLinePolygon3d
- intersectLineSphere
- intersectLineTriangle3d
- intersectPlanes
- intersectPlaneSphere
- intersectRayPolygon3d
- intersectThreePlanes
- isBelowPlane
- isCoplanar
- isParallel3d
- isPerpendicular3d
- isPlane
- isPointInEllipsoid
- isPointOnEdge3d
- isPointOnLine3d
- isTransform3d
- linePosition3d
- lines3d
- lineToEdge3d
- medianPlane
- mergeBoxes3d
- midPoint3d
- normalizeLine3d
- normalizePlane
- normalizeVector3d
- oblateSurfaceArea
- orientedBox3d
- parallelLine3d
- parallelPlane
- planeNormal
- planePoint
- planePosition
- planes3d
- planesBisector
- points3d
- polygon3dNormalAngle
- polygonArea3d
- polygonCentroid3d
- polygons3d
- projLineOnPlane
- projPointOnCircle3d
- projPointOnCylinder
- projPointOnLine3d
- projPointOnPlane
- prolateSurfaceArea
- randomAngle3d
- randomPointInBox3d
- recenterTransform3d
- registerPoints3dAffine
- reverseLine3d
- reversePlane
- revolutionSurface
- rotation3dAxisAndAngle
- rotation3dToEulerAngles
- sph2cart2
- sph2cart2d
- spheres
- sphericalAngle
- sphericalVoronoiDomain
- surfaceCurvature
- transformLine3d
- transformPlane3d
- transformPoint3d
- transforms3d
- transformVector3d
- triangleArea3d
- vectorAngle3d
- vectorCross3d
- vectorNorm3d
- vectors3d
matGeom/geom3d/private
matGeom/graphs
- addSquareFace
- adjacencyListToEdges
- boundaryGraph
- boundedCentroidalVoronoi2d
- boundedVoronoi2d
- centroidalVoronoi2d
- centroidalVoronoi2d_MC
- clipGraph
- clipGraphPolygon
- clipMesh2dPolygon
- Contents.m
- cvtIterate
- cvtUpdate
- delaunayGraph
- drawDigraph
- drawDirectedEdges
- drawEdgeLabels
- drawGraph
- drawGraphEdges
- drawNodeLabels
- drawSquareMesh
- euclideanMST
- fillGraphFaces
- gabrielGraph
- gcontour2d
- gcontour3d
- grAdjacentEdges
- grAdjacentNodes
- graph2Contours
- graphCenter
- graphDiameter
- graphPeripheralVertices
- graphRadius
- grClose
- grDilate
- grEdgeLengths
- grErode
- grFaceToPolygon
- grFindGeodesicPath
- grFindMaximalLengthPath
- grLabel
- grMean
- grMedian
- grMergeMultipleEdges
- grMergeMultipleNodes
- grMergeNodeClusters
- grMergeNodes
- grMergeNodesMedian
- grNodeDegree
- grNodeInnerDegree
- grNodeOuterDegree
- grOpen
- grOppositeNode
- grPropagateDistance
- grRemoveEdge
- grRemoveEdges
- grRemoveMultiplePoints
- grRemoveNode
- grRemoveNodes
- grShortestPath
- grSimplifyBranches
- grSimplifyBranches_old
- grVertexEccentricity
- imageGraph
- knnGraph
- mergeGraphs
- meshEnergy
- patchGraph
- prim_mst
- pruneGraph
- quiverToGraph
- readGraph
- relativeNeighborhoodGraph
- voronoi2d
- writeGraph
matGeom/meshes3d
- averageMesh
- boxToMesh
- checkMeshAdjacentFaces
- clipConvexPolyhedronHP
- clipMeshVertices
- collapseEdgesWithManyFaces
- concatenateMeshes
- Contents.m
- createCube
- createCubeOctahedron
- createDodecahedron
- createDurerPolyhedron
- createIcosahedron
- createMengerSponge
- createOctahedron
- createRhombododecahedron
- createSoccerBall
- createStellatedMesh
- createTetrahedron
- createTetrakaidecahedron
- curveToMesh
- cutMeshByPlane
- cylinderMesh
- distancePointMesh
- drawFaceNormals
- drawMesh
- drawPolyhedron
- ellipsoidMesh
- ensureManifoldMesh
- fillMeshFaces
- intersectEdgeMesh3d
- intersectLineMesh3d
- intersectPlaneMesh
- isManifoldMesh
- isPointInMesh
- mergeCoplanarFaces
- mergeMeshVertices
- meshAdjacencyMatrix
- meshBoundary
- meshBoundaryEdgeIndices
- meshBoundaryVertexIndices
- meshComplement
- meshCurvatures
- meshDihedralAngles
- meshEdgeFaces
- meshEdgeLength
- meshEdges
- meshFace
- meshFaceAdjacency
- meshFaceAreas
- meshFaceCentroids
- meshFaceEdges
- meshFaceNormals
- meshFaceNumber
- meshFacePolygons
- meshSilhouette
- meshSurfaceArea
- meshVertexClustering
- meshVertexNormals
- meshVolume
- meshVoronoiDiagram
- minConvexHull
- polyhedra
- polyhedronCentroid
- polyhedronMeanBreadth
- polyhedronNormalAngle
- polyhedronSlice
- readMesh
- readMesh_off
- readMesh_ply
- readMesh_stl
- removeDuplicateFaces
- removeInvalidBorderFaces
- removeMeshEars
- removeMeshFaces
- removeMeshVertices
- smoothMesh
- smoothMeshFunction
- sphereMesh
- splitMesh
- steinerPolytope
- subdivideMesh
- surfToMesh
- tetrahedronVolume
- torusMesh
- transformMesh
- triangulateCurvePair
- triangulateFaces
- triangulatePolygonPair
- trimeshEdgeFaces
- trimeshMeanBreadth
- trimeshSurfaceArea
- trimMesh
- vertexNormal
- writeMesh
- writeMesh_off
- writeMesh_ply
- writeMesh_stl
matGeom/meshes3d/private
matGeom/polygons2d
- cart2geod
- clipPolygon
- clipPolygonHP
- clipPolyline
- Contents.m
- contourMatrixToPolylines
- convexHull
- convexification
- curvature
- curveCMoment
- curveCSMoment
- curveMoment
- densifyPolygon
- distancePointPolygon
- distancePointPolyline
- distancePolygons
- distancePolygonsNoCross
- distancePolylines
- drawPolygon
- drawPolyline
- drawVertices
- expandPolygon
- fillPolygon
- findPoint
- geod2cart
- intersectEdgePolygon
- intersectLinePolygon
- intersectLinePolyline
- intersectPolylines
- intersectRayPolygon
- isPointInPolygon
- isPointOnPolyline
- medialAxisConvex
- minimumCaliperDiameter
- parametrize
- pointSetsAverage
- polygonArea
- polygonBounds
- polygonCentroid
- polygonContains
- polygonCurvature
- polygonEdges
- polygonEquivalentEllipse
- polygonInertiaEllipse
- polygonLength
- polygonLoops
- polygonNormalAngle
- polygonOuterNormal
- polygonPoint
- polygonSecondAreaMoments
- polygonSelfIntersections
- polygonSignature
- polygonSkeleton
- polygonSubcurve
- polygonSymmetryAxis
- polygonToRow
- polygonVertices
- polylineCentroid
- polylineLength
- polylinePoint
- polylineSelfIntersections
- polylineSubcurve
- projPointOnPolygon
- projPointOnPolyline
- randomPointInPolygon
- readPolygonSet
- removeMultipleVertices
- resamplePolygon
- resamplePolygonByLength
- resamplePolyline
- resamplePolylineByLength
- reversePolygon
- reversePolyline
- rowToPolygon
- signatureToPolygon
- simplifyPolygon
- simplifyPolyline
- smoothPolygon
- smoothPolyline
- splitPolygons
- steinerPoint
- steinerPolygon
- supportFunction
- triangulatePolygon
- writePolygonSet
matGeom/polygons2d/private
matGeom/utils
demos/geom2d/triangle
demos/geom3d
demos/graphs
demos/meshes3d
- createTrefoilKnot
- demoCutMeshByPlane
- demoIntersectLineMesh3d
- demoIntersectPlaneMesh
- demoPolyhedra
- demoRemoveMeshFaces
- demoTriangulateFaces
- demoVoronoiCell
demos/polygons2d
demos/tessel2d
Version | Published | Release Notes | |
---|---|---|---|
1.2.5 | See release notes for this release on GitHub: https://github.com/mattools/matGeom/releases/tag/v1.2.5 |
||
1.2.4 |
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)