Triangle#
Qualified name: manim.mobject.geometry.polygram.Triangle
- class Triangle(**kwargs)[source]#
Bases:
RegularPolygonAn equilateral triangle.
- Parameters
kwargs – Additional arguments to be passed to
RegularPolygon
Examples
Example: TriangleExample ¶
from manim import * class TriangleExample(Scene): def construct(self): triangle_1 = Triangle() triangle_2 = Triangle().scale(2).rotate(60*DEGREES) tri_group = Group(triangle_1, triangle_2).arrange(buff=1) self.add(tri_group)
Methods
Attributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.