Function or value | Description |
Full Usage:
area triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Quantity<Squared<'Units>>
|
![]() ![]() ![]() ![]() ![]() ![]() Get the area of a triangle. The result will always be positive regardless of whether the triangle's vertices are in clockwise or counterclockwise order.
|
Full Usage:
centroid triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Point2D<'Units, 'Coordinates>
|
|
Full Usage:
circumcircle triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Circle2D<'Units, 'Coordinates> option
|
![]() ![]() ![]() ![]() ![]() ![]() Attempt to find the circumcircle of a triangle, a circle that passes through each of the triangle's vertices; If the triangle is degenerate (its three vertices are collinear), returns `None`.
|
Full Usage:
clockwiseArea triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Quantity<Squared<'Units>>
|
![]() ![]() ![]() ![]() ![]() ![]() Get the signed area of a triangle, returning a positive value if the triangle's vertices are in clockwise order and a negative value otherwise.
|
Full Usage:
contains point triangle
Parameters:
Point2D<'Units, 'Coordinates>
triangle : Triangle2D<'Units, 'Coordinates>
Returns: bool
|
![]() ![]() ![]() ![]() ![]() ![]() Check whether a given point is inside a given triangle. It does not matter whether the triangle's vertices are in clockwise or counterclockwise order.
|
Full Usage:
counterclockwiseArea triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Quantity<Squared<'Units>>
|
![]() ![]() ![]() ![]() ![]() ![]() Get the signed area of a triangle, returning a positive value if the triangle's vertices are in counterclockwise order and a negative value otherwise.
|
Full Usage:
edges triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: LineSegment2D<'Units, 'Coordinates> * LineSegment2D<'Units, 'Coordinates> * LineSegment2D<'Units, 'Coordinates>
|
![]() ![]() ![]() ![]() ![]() ![]() Get the edges of a triangle: from the first vertex to the second, from the second to the third, and from the third back to the first.
|
Full Usage:
from p1 p2 p3
Parameters:
Point2D<'Units, 'Coordinates>
p2 : Point2D<'Units, 'Coordinates>
p3 : Point2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
|
Full Usage:
fromVertices (arg1, arg2, arg3)
Parameters:
Point2D<'Units, 'Coordinates>
arg1 : Point2D<'Units, 'Coordinates>
arg2 : Point2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
|
Full Usage:
mirrorAcross axis triangle
Parameters:
Axis2D<'Units, 'Coordinates>
triangle : Triangle2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
![]() ![]() ![]() ![]() ![]() ![]() Mirror a triangle across a given axis. Note that mirroring a triangle will result in its 'winding direction' being flipped - if the triangle's vertices were in counterclockwise order before mirroring, they will be in clockwise order afterwards and vice versa.
|
Full Usage:
placeIn frame triangle
Parameters:
Frame2D<'Units, 'GlobalCoordinates, 'LocalCoordinates>
triangle : Triangle2D<'Units, 'LocalCoordinates>
Returns: Triangle2D<'Units, 'GlobalCoordinates>
|
![]() ![]() ![]() ![]() ![]() ![]() Take a triangle considered to be defined in local coordinates relative to a given reference frame, and return that triangle expressed in global coordinates.
|
Full Usage:
relativeTo frame triangle
Parameters:
Frame2D<'Units, 'GlobalCoordinates, 'LocalCoordinates>
triangle : Triangle2D<'Units, 'GlobalCoordinates>
Returns: Triangle2D<'Units, 'LocalCoordinates>
|
![]() ![]() ![]() ![]() ![]() ![]() Take a triangle defined in global coordinates, and return it expressed in local coordinates relative to a given reference frame.
|
Full Usage:
rotateAround centerPoint angle triangle
Parameters:
Point2D<'Units, 'Coordinates>
angle : Angle
triangle : Triangle2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
|
Full Usage:
scaleAbout point scale triangle
Parameters:
Point2D<'Units, 'Coordinates>
scale : float
triangle : Triangle2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
![]() ![]() ![]() ![]() ![]() ![]() Scale a triangle about a given point by a given scale. Note that scaling by a negative value will result in the 'winding direction' of the triangle being flipped - if the triangle's vertices were in counterclockwise order before the negative scaling, they will be in clockwise order afterwards and vice versa.
|
Full Usage:
translateBy vector triangle
Parameters:
Vector2D<'Units, 'Coordinates>
triangle : Triangle2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
|
Full Usage:
translateIn direction distance triangle
Parameters:
Direction2D<'Coordinates>
distance : Quantity<'Units>
triangle : Triangle2D<'Units, 'Coordinates>
Returns: Triangle2D<'Units, 'Coordinates>
|
|
Full Usage:
vertices triangle
Parameters:
Triangle2D<'Units, 'Coordinates>
Returns: Point2D<'Units, 'Coordinates> * Point2D<'Units, 'Coordinates> * Point2D<'Units, 'Coordinates>
|
|