Triangle
Module Geometry.Triangles
In ixfx, a Triangle consists of three Points
Once you have that there are a bunch of functions to help you work with circles.
- angles - interior angles
- anglesDegrees - interior angles in degrees
- apply - apply a function to each corner point
- area - calculate area of triangle
- bbox - compute bounding box
- centroid - roughly center point of a triangle
- corners - corner positions
- edges - get edges as Lines
- innerCircle - largest circle enclosed by triangle
- lengths - compute length of edges
- outerCircle - largest circle touching corners of triangle
- perimeter - sum of edge lengths
- rotate
- rotateByVertex
Comparison with other shapes
- intersectsPoint - true if point is within or on boundary of triangle
Creating/conversion
- equilateralFromVertex - create an equilateral triangle from one vertex
- fromFlatArray - convert from set of coordinates in flat array
- fromPoints - convert from set of points
- fromRadius - create from an origin and radius
- toFlatArray
Barycentric coordinates
- barycentricCoord - get the Barycentric coordinate given a number or point
- barycentricToCartesian - convert a Barycentric coordinate to Cartesian
Kinds