Skip to content

Conversation

@iory
Copy link
Member

@iory iory commented May 30, 2024

  • Updated the condition to detect concave vertices: If the z component of the cross product is less than or equal to zero, the triangle is considered concave, indicating that the angle between the vectors is greater than 180 degrees.

Correct the decomposition part of the polygon and resolve the following issues.
#2840

…detection

- Updated the condition to detect concave vertices:
  If the z component of the cross product is less than or equal to zero,
  the triangle is considered concave, indicating that the angle between the vectors is greater than 180 degrees.

- Improved the condition to detect flat triangles:
  If the norm (length) of the cross product is close to zero, the vectors are collinear, making the triangle flat with no area.

- Added detailed comments to explain the conditions for concave and flat triangles for better readability and maintainability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants