cherab.imas.math.polygon.calculate_2d_cell_geometryΒΆ
- cherab.imas.math.polygon.calculate_2d_cell_geometry(vertices, triangles, cell_to_triangle)ΒΆ
Calculate areas and area centroids of triangulated 2-D cells.
Each polygonal cell is represented by one or more triangles. The centroid is the area-weighted centroid of those triangles.
- Parameters:
- Returns:
tuple of ndarray β Cell centroids with shape
(K, 2)and areas with shape(K,).