API Reference > geometry-core > CartesianGeometry > BarycentricTriangle BarycentricTriangle Class 3 points defining a triangle to be evaluated with Barycentric coordinates. Methods Name Description constructor(point0: Point3d, point1: Point3d, point2: Point3d): BarycentricTriangle Protected Constructor. centroid(result?: Point3d): Point3d Return the centroid of the 3 points. clone(result?: BarycentricTriangle): BarycentricTriangle Return a new BarycentricTriangle with the same coordinates. dotProductOfCrossProductsFromOrigin(other: BarycentricTriangle): number * For this and other BarycentricTriangles, compute cross products of vectors from point0 to point1 and from point0 to point2. fractionToPoint(a0: number, a1: number, a2: number, result?: Point3d): Point3d Sum the points with given scales. isAlmostEqual(other: BarycentricTriangle): boolean test for point-by-point isAlmostEqual relationship. set(point0: undefined | Point3d, point1: undefined | Point3d, point2: undefined | Point3d): void copy contents of (not pointers to) the given points. setFrom(other: BarycentricTriangle): void Copy all values from other create(point0: Point3d, point1: Point3d, point2: Point3d, result?: BarycentricTriangle): BarycentricTriangle Static create a triangle with coordinates cloned from given points. createXYZXYZXYZ(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, result?: BarycentricTriangle): BarycentricTriangle Static Return a BarycentricTriangle with coordinates given by enumerated x,y,z of the 3 points. Properties Name Type Description area Accessor ReadOnly number Return the area of the triangle. aspectRatio Accessor ReadOnly number Return area divided by sum of squared lengths. points Point3d[] Array of 3 point coordinates for the triangle. Defined in geometry3d/BarycentricTriangle.ts Line 16 Last Updated: 12 June, 2024