10.1.4.16. Triangle

Module to implement triangle.

class Patro.GeometryEngine.Triangle.Triangle2D(p0, p1, p2)[source]

Bases: Patro.GeometryEngine.Primitive.Primitive2DMixin, Patro.GeometryEngine.Primitive.ClosedPrimitiveMixin, Patro.GeometryEngine.Primitive.PathMixin, Patro.GeometryEngine.Primitive.PolygonMixin, Patro.GeometryEngine.Primitive.Primitive3P

Class to implements 2D Triangle.

__init__(p0, p1, p2)[source]

Initialize self. See help(type(self)) for accurate signature.

_cache_angle()[source]
_cache_length()[source]
area
bisector_line0
bisector_line1
bisector_line2
bisector_vector0
bisector_vector1
bisector_vector2
centroid
circumcenter
edges
in_circle
is_acute
is_closed

True if the primitive is a closed path.

is_equilateral
is_isosceles
is_oblique
is_obtuse
is_point_inside(point)[source]
is_right
is_scalene
orthocenter
perimeter
Patro.GeometryEngine.Triangle.same_side(p1, p2, a, b)[source]

Return True if the points p1 and p2 lie on the same side of the edge [a, b].

Patro.GeometryEngine.Triangle.triangle_orientation(p0, p1, p2)[source]

Return the triangle orientation defined by the three points.