#struct #geometry #3d

triangle

Struct for geometric triangles. Includes Barycentric-Cartesian transforms and stuff..

11 releases

0.2.0 Apr 14, 2023
0.1.353 Sep 6, 2021
0.1.352 Aug 11, 2021
0.1.351 Feb 25, 2021
0.1.349 Dec 22, 2020

#4 in #cartesian

Download history 7/week @ 2023-07-22 4/week @ 2023-07-29 14/week @ 2023-08-05 34/week @ 2023-08-12 37/week @ 2023-08-19 59/week @ 2023-08-26 6/week @ 2023-09-02 29/week @ 2023-09-09 54/week @ 2023-09-16 2/week @ 2023-09-23 9/week @ 2023-09-30 5/week @ 2023-10-07 5/week @ 2023-10-14 7/week @ 2023-10-21 32/week @ 2023-10-28 6/week @ 2023-11-04

51 downloads per month

MIT license

16KB
345 lines

Struct for geometric triangles.

Features:

  • AABB
  • Angles
  • Area
  • Barycentric to Cartesian transform
  • Cartesian to Barycentric transform
  • Centroid
  • Circumradius
  • Checks wheter a given point lies inside the triangle
  • Checks if vertices are collinear
  • Heights
  • Inradius
  • Is it equilateral
  • Is it golden
  • Is it isosceles
  • Is it right-angled
  • Are Points sorted by axis
  • Medians
  • Normal
  • Perimeter
  • Ray/Triangle intersection by Möller & Trumbore algorithm
  • Semiperimeter
  • Sides
  • Sort Points by axis

Dependencies

~155KB