magnet.geometric_utils.polygon_area_vector#
- magnet.geometric_utils.polygon_area_vector(v: ndarray) ndarray #
Compute area vector of a polygon in 3D space.
Compute the vector normal to the polygon’s plane having magnitude equal to its area; the direction depends on the arrangement of the nodes (clockwise or counterclockwise).
- Parameters:
v (np.ndarray) – Array of shape (N, 3), where N is the number of vertices of the polygon, containing the polygon vertices oordinates.
- Returns:
Polygon area vector.
- Return type:
np.ndarray