convexBarycentricCoordinates MethodStatic
Compute the barycentric coordinates for a point inside a convex polygon.
convexBarycentricCoordinates(polygon: IndexedXYZCollection | Point3d[], point: Point3d, tolerance: numberGeometry.smallMetricDistance): undefined | number[]
@returns barycentric coordinates of the interior point, or undefined if invalid polygon or exterior point. Length is same as polygon.length
.
@see pointToFraction
Parameter | Type | Description |
---|---|---|
polygon | IndexedXYZCollection | Point3d[] | points of the polygon, assumed to be convex. Closure point optional. |
point | Point3d | point assumed to be inside or on polygon |
tolerance | number | distance tolerance for point to be considered on a polygon edge |
Returns - undefined | number[]
barycentric coordinates of the interior point, or undefined if invalid polygon or exterior point. Length is same as polygon.length
.
Defined in
- geometry3d/PolygonOps.ts Line 1225
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.